-
Notifications
You must be signed in to change notification settings - Fork 2
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
Data types need to be more explicit in the JSON-LD #51
Comments
I think andreas is right that we have some "magic" code in our starUML importer that sets data types. And I think he's right that there should be something more explicit in the JSON-LD vocab that drives this. In the example Andreas gives, we know that the CDT for borderCrossingDateTime is DateTime and so we should be able to set a corresponding xsd:dateTime type instead of xsd:string in the JSON-LD vocabulary? |
@kshychko can you make the vocab generator to set range |
And, in general, the right xsd type for the relevant cdt ? For example xsd:decimal xsd:Boolean xsd:QName. How about we suggest a mapping from CDTs to XSD types, put that in the NDR document, and then implement it ? |
Hi all. If I understand your proposal correct, I do not agree to it. It should not be defined how to import a JSON-LD to UML and change the data type name based on naming. This will not be intuitive for any implementers outside this group. Instead a rule should be set up for the creation of the JSON-LD. I took a look at the official GS1 Vocab extension for schema.org. There it is solved using e.g. this:
So it would follow an already existing way of schema.org and it would be intuitive for new developers. The transformation from JSON-LD to JSON schema or UML to JSON schema would be clearly defined as well. |
Hi Andreas - I think we are actually agreeing. This ticket has nothing to do with UML. It's about the NDR to create better json-ld WITH data types. So we are proposing to fix the source (JSON-LD) and NOT embed mysterious rules in some UML importer |
You mean NOT to embed mysterious rules, right? |
Yes, sorry - I fixed the comment to add that critical "NOT" ;) |
This seems to be a duplicate of #47 |
@AP-G The example you give (
The context allows JSONLD instance data to say Someone could still provide an explicit (and even wrong) datatype, eg |
@Fak3 thanks for the mapping table! Questions:
Disagree, see uncefact/spec-jsonld#48, uncefact/spec-jsonld#49
Better pick and standardize your numeric types very carefully (uncefact/spec-jsonld#46) because w3c/json-ld-syntax#387. |
From slack thread Andreas Pelekies:
Exporting: In section 2.3.4 the handling of CCTS versus JSON data types is described. For instance a CCTS<> shall be mapped to JSON string with format qualifier "datetime". If I take a look for instance at the property "borderCrossingDateTime" from TransportMovement in the vocab only a
is defined. The format is missing. When importing to StarUML I think you do "the magic" by looking at the ending of the name or the cefact metadata, right? I think this does not match section 2.3.4 as a "Newby" web developer will probably not read this guideline before using the vocab. So it would be better to add the format information. In addition the "Core data types" are missing completely in the vocab and you implicitely add them in the import routine. Wouldn't it make more sense to add them in the vocab export as well and then attach the rangeIncludes directly to the Core Types?
The text was updated successfully, but these errors were encountered: