Talk:RDF JSON Specification
From n² wiki
Contents |
[edit] Subject Anonymous
Not all anonymous starts with _. We may need to introduce an additional level of indirection to qualify the type of node for the subject. This would resolve also the next issue related to subject as literal. This would add an additional level of complexity. - User:Fellahst
No valid URI can start with a _: (see http://www.ietf.org/rfc/rfc3986.txt), so it's ok, _: is sufficient to distinguish bnodes from URIs. -kwijibo
[edit] Support of XML Literal
An additional key may be added to indicate that a literal is an XML string. - User:Fellahst
-- This isn't necessary, http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral is a datatype, and can happily go under the 'datatype' key -kwijibo
[edit] Handling of RDF containers and collection
The RDF mapping to JSON is not fully canonical to RDF because the lack of support of containers (list, bag,seq,alt). -User:Fellahst
These are syntactic sugar - not all RDF serialisations offer shorthand for these constructs, so as far as we are aware, RDF/JSON is fully capable of expressing any RDF/XML data. I don't personally see a great deal of advantage in spoiling the consistency of RDF/JSON by giving these special treatment, but please argue the case if you think it merits further consideration :) -kwijibo
[edit] Arguments in favour of Qnames
- more compact scripting (no tedious long uri to type) - User:Fellahst
This would be true only in cases where the consumer is guaranteed that the publisher is using a specific prefix for a specific namespace. Otherwise, you need to address the property with a proper unique identifier (its URI). We think that in the majority of cases, consumers will not be in such a position of knowing which prefixes will be used for all the data returned, and therefore, it will lead to shorter, more robust and reusable code, if full URIs are used throughout -kwijibo
[edit] Redundancy
I just researched about RDF in JSON to enhance the SeeAlso API. In my opinion the "type" element (either "literal","bnode", or "uri") in RDF values is redundant. As far as I understand the RDF value syntax in JSON for SPARQL results is:
| RDF URI Reference U | {"type":"uri", "value":"U"} |
| RDF Literal L | {"type":"literal", "value":"L"} |
| RDF Literal L with language G | {"type":"literal", "xml:lang":"G", "value":"L"} |
| RDF Typed Literal L with datatype URI D | {"type":"typed-literal", "datatype":"D", "value":"L"} |
| Blank Node label I | {"type":"bnode", "value":"I"} |
Your specification is:
| RDF URI Reference U | {"type":"uri", "value":"U"} |
| RDF Literal L | {"type":"literal", "value":"L"} |
| RDF Literal L with language G | {"type":"literal", "lang":"G", "value":"L"} |
| RDF Typed Literal L with datatype URI D | {"type":"typed-literal", "datatype":"D", "value":"L"} |
| Blank Node label I | {"type":"bnode", "value":"_:I"} |
But you can have it easier:
| RDF URI Reference U | {"uri":"U"} |
| RDF Literal L | {"value":"L"} |
| RDF Literal L with language G | {"lang":"G", "value":"L"} |
| RDF Typed Literal L with datatype URI D | {"type":"D", "value":"L"} |
| Blank Node label I | {"bnode":"I"} |
greetings -- JakobVoss 16:22, 14 February 2008 (UTC)

