Skip to content

RDFa to JSON LD

niklasl edited this page Aug 16, 2012 · 1 revision

The current solution creates expanded JSON-LD.

The initial experiment created JSON-LD "faithful" to the syntactic RDFa input. While this output was semi-compact, I believe consumers must have control over this.

CURIEs are useful in RDFa for authoring, and are acceptable there because that data is not intended to be consumed directly, syntactically, from the source. By producing a JSON-LD semi-compact transcript of this form, non-RDF-aware consumers will be misled to use these as formal tokens, and not as contextually dependent shorthand. If the equivalent form of an RDFa source is desired, a JSON-LD context can be derived from a basic RDFa document (though yet to be implemented in this lab).

Instead, with the current expanded output, they can either directly use IRIs as keys to access properties of the objects (i.e. work with the full RDF data), or apply standard JSON-LD tools for compaction. Also, for especially convenient digestion and access, see this lab's implementation of connect and toGraph.

Clone this wiki locally