Introduction
JSON for Linked Data (or JSON-LD, for short) is a developing standard for the representation of linked data in a way that is easily digested by web applications.
jsonld-convert is a utility to convert JSON-LD data to or from RDF. The utility implements the JSON-LD RDF API.
Usage
jsonld-convert [options] [INPUT-FILE] [OUTPUT-FILE]
The arguments are:
- INPUT-FILE
- the source file for jsonld-convert.
-
can be used to indicate standard input. - OUTPUT-FILE
- the output file for jsonld-convert.
-
can be used to indicate standard output.
Options
- -2rdf
- Specifies that jsonld-convert should convert the source file from JSON-LD format to RDF format.
- -2jsonld
- Specifies that jsonld-convert should convert the source file from RDF format to JSON-LD format.
- -triple
- Specifies that input or output RDF file is RDF triples.
- -quad
- Specifies that input or output RDF file is RDF quads.
- -graph GRAPH
- Specifies the graph context to which RDF output should be converted into rdf quads. GRAPH refers to the RDF graph.
- -bnprefix PREFIX
- Specifies the blank node identifier that is used in place of a JSON-LD graph that does not contain a de-referenceable identifier, to be used in the rdf output. PREFIX refers to the blank node prefix being generated. The PREFIX must begin with “_:”.
- -context CONTEXT
- specifies the @context strings to which JSON-LD output is generated. CONTEXT refers to the @context string(s) in generated for the JSON-LD output.