Clone URL (Committers only):
https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://jena.apache.org/documentation%2Fio%2Frdf-output.mdtext

fpservant

Index: trunk/content/documentation/io/rdf-output.mdtext
===================================================================
--- trunk/content/documentation/io/rdf-output.mdtext    (revision 1655891)
+++ trunk/content/documentation/io/rdf-output.mdtext    (working copy)
@@ -16,6 +16,7 @@
   - [N-Triples and N-Quads](#n-triples-and-n-quads)
   - [RDF Thrift](#rdf-thrift)
   - [RDF/XML](#rdfxml)
+  - [JSON-LD](#json-ld)
 - [Examples](#examples)
 - [Notes](#Notes)
 
@@ -316,6 +317,20 @@
 | RDFXML    | RDFXML_PRETTY, RDF_XML_ABBREV | "RDF/XML-ABBREV" |
 | RDFXML_PLAIN |                            | "RDF/XML"        |
 
+### JSON-LD
+
+JSON-LD output is supported, in its various flavors ("compacted", "expanded", 
"flattened", "framed"), 
+by using one of the following RDFFormats:
+
+JSONLD_EXPAND_PRETTY, JSONLD_EXPAND_FLAT, JSONLD_COMPACT_PRETTY, 
JSONLD_COMPACT_FLAT, JSONLD_FLATTEN_PRETTY, JSONLD_FLATTEN_FLAT, 
JSONLD_FRAME_PRETTY, JSONLD_FRAME_FLAT
+
+The JSONLD and JSONLD_PRETTY are identical to JSONLD_COMPACT_PRETTY.
+
+Output can be customized, passing more info to the writer by using the 
"Context" mechanism provided by Jena.
+Same mechanism must be used to pass the "frame" in the JSONLD_FRAME_PRETTY and 
JSONLD_FRAME_FLAT cases.
+
+What can be done, and how it can be, is explained in the [sample 
code](https://github.com/apache/jena/tree/master/jena-arq/src-examples/arq/examples/riot/ExJsonLD.java)
+
 ## Examples
 
 Example code may be found in 
[jena-arq/src-examples](https://github.com/apache/jena/tree/master/jena-arq/src-examples/arq/examples/riot/).

Reply via email to