-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JTS] Extend JSON Table Schema to support typed field validation #96
Comments
JSON-LD @type is used to specify a "node type" (e.g. the URI of a type of resource, such as Person) or a "value type". Its the latter that is equivalent to what I'm proposing here. JSON-LD uses URIs for type values, which we could use here, or just use the simple type names. I'm suggesting that we allow any of the XML Schema datatypes to be used as they have well-specified formats/value spaces. I think the range of different date types is useful too. We could constrain it, but I think there's value in having a well-defined set of types, no need to reinvent the well if XSD has them already. I see minimum/maximum as being distinct from min/maxLength because the latter are checking number of characters in the value, whereas the former is checking a range based on the type of the value. E.g. a minimum date or a minimum number. |
re: the JSON-LD table, proposal, yes, that makes sense. Using URIs is fine with me. However I think for validation purposes you'll want to recommend a working set of types to avoid people creating new ones. re: min/max, I separated out this discussion as I thought it might invoke more debate (e.g. on constraining the types) whereas I saw the basic validation support as relatively uncontroversial ;) |
JSON Schema has Re: |
@rgrp is this relevant anymore? From the age and some of the points, I'm inclined to close as out of date. |
INVALID. Now out of date / obsolete. |
This proposal builds on #95. Background here: https://github.com/theodi/csv-validation-research/wiki/Extending-Data-Packages-to-Support-CSV-File-Validation
Allow a JTS to include:
type
-- specify data type using XML Schema, not current short list of typesminimum
-- minimum value of field, e.g. lowest number or earliest datemaximum
-- maximum value of a field, e.g. highest number or latest dateThe current values for
type
might be better based on the data types in XML Schema. This provides a well documented and well supported range of basic data types. These could be supplemented with additional values where necessary. For CSV validation use cases a broader range of basic data and date types would be useful.The
pattern
keyword described in #95 would allow types to be properly parsed.Date-time formats could be based on strftime: http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
The text was updated successfully, but these errors were encountered: