Re: json-ld-syntax review, part 2

On Mar 5, 2013, at 4:44 AM, Sandro Hawke <sandro@w3.org> wrote:

> I think the document could be greatly strengthened (and most of my non-trivial comments in part 1 addressed) by the following changes:  \
> 
> 1.  In Conformance add something like:
> 
> A conforming JSON-LD Expander takes as input a conforming JSON-LD document D1 and outputs a conforming JSON-LD document  D2, using the expansion mapping defined in Appendix @@1.  D2 will contain no @context declarations and, informally, will convey the same underlying information.
> 
> A conforming JSON-LD Compactor takes as input a JSON-LD @context declaration and conforming JSON-LD document D2 and outputs a conforming JSON-LD document D1, such that a conforming JSON-LD Expander would convert D1 to D2 (or an equivalent document which would JSON-parse to the same internal structure).
> 
> A conforming JSON-LD To-RDF Converter takes as input a conforming JSON-LD document J and outputs an RDF Dataset R using the conversion mapping defined in Appendix C.
> 
> A conforming JSON-LD From-RDF Converter takes as input an RDF Dataset R and output a JSON-LD document J such that a conforming JSON-LD To-RDF Converter would convert J to D (or an equivalent document which would JSON-parse to the same internal structure).
> Note there is no need to define the Compaction and From-RDF mappings in detail; it's enough to say (as above) that they are the inverses of already-defined mappings.   I believe that sufficiently constrains them.  For implementation advice, they can see another document, which need only be a Note.
>  
> 2.  Add appendix @@1 which defines the expansion mapping.     I have not actually looked at how that's currently defined.
> 
> 3.  Move json-ld-api sections 5.18-5.21 and 5.23 to json-ld-syntax appendix C.

Sandro, we discussed moving the algorithms relevant to RDF conversion out of the API doc and into the base JSON-LD doc, but we don't find that practical. Many of the algorithms outlined in JSON-LD-API are essential for transforming JSON-LD into RDF (context processing, value expansion, IRI expansion, Expansion and Flattening). Instead, I've created an informative description of the process of turning JSON-LD into RDF (and vice-versa) in section C.1 [1]. This is necessarily brief, and does not detail the treatment of RDF Collections or Named Graphs.

Please let us know if this resolves this particular issue.

Gregg Kellogg
gregg@greggkellogg.net

[1] http://json-ld.org/spec/latest/json-ld-syntax/#transformation-from-json-ld-to-rdf

> Note that we should probably change the shortname from /TR/json-ld-syntax to /TR/json-ld for the next publication.  It's a bit of a pain, but worthwhile in the long run, I think.
> 
> These changes would make json-ld-syntax stand parallel to Turtle, as a completely defined RDF serialization syntax (not *needing* the API document), but they wouldn't significantly reduce the "RDF tax" on JSON-LD.   Just a few sentences in Conformance and a longer RDF Appendex.  That seems to me like a good thing (and also what I understood the RDF WG to be asking for).
> 
>      -- Sandro
> 

Received on Tuesday, 19 March 2013 20:53:35 UTC