Closed elf-pavlik closed 7 years ago
Hmm. I'm not a JSON-LD expert, but what about http://json-ld.org/spec/latest/json-ld/#dfn-coercion ? There is an example using same approach. The difference is the example uses an xsd:integer, which is not a class but a datatype, but this shouldn't matter. I have no issues with fixing the issues, but I'd like to be 100% sure that it is indeed an issue.
That's right. Coercion.
For a JSON object { "key": "value" }
"@type": "URI"
means that the string value is a typed literal. Always.
"@typr": "@id"
means that the string value is an identifier.
@lanthaler I think I addressed most of your feedback
The difference is the example uses an xsd:integer, which is not a class but a datatype, but this shouldn't matter.
@alien-mcl it does matter, with datatype one gets a Literal and not an IRI (NamedNode). I think we can trust @lanthaler with JSON-LD nuances since he co-edited&authored that spec.
Anyone opposed to merging this change? If I don't hear any objection, I'll merge it in the next days
Thanks for these fixes @elf-pavlik
as reported in https://github.com/HydraCG/Specifications/pull/113#pullrequestreview-35602303
https://www.w3.org/TR/json-ld/#h_note_1