Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Rdf_json_ld.Json_ld
SourceJSON-LD API.
Only minimum functions to communicate with JSON-LD are implemented, i.e. context processing, expansion, deserialization and serialization.
Use of JSON-LD should be avoided when possible.
Initialize an expansion context from the given base IRI.
val expansion :
T.options ->
?frame_expansion:bool ->
Expand.ctx ->
J.json ->
Iri.t ->
J.json Lwt.t
expansion options context json base
expands the given json
value in context
, with base
IRI, honouring options
. Optional argument frame_expansion
is supposed to work as specified here (default is false).
to_rdf options json graph
builds a context from options
, expands the json
value (using graph
name as base IRI), then applies the node map generation and JSON-LD to RDF algorithms to build the returned dataset. The provided graph
is the default graph of the returned dataset.
from_rdf options dataset
serializes the given dataset
to a JSON-LD value, honouring options
. Beware that the specified RDF to JSON-LD algorithm is not implemented, but a simpler version returning some flat (but correct) JSON-LD.