JSON.LD.Decoder (JSON-LD.ex v1.0.0)

View Source

A decoder for JSON-LD serializations to RDF.Datasets.

As for all decoders of RDF.Serialization.Formats, you normally won't use these functions directly, but via one of the read_ functions on the JSON.LD format module or the generic RDF.Serialization module.

Summary

Functions

node_to_rdf(node)

@spec node_to_rdf(String.t()) :: RDF.IRI.t() | RDF.BlankNode.t() | nil

parse_json(content, opts \\ [])

@spec parse_json(String.t(), [Jason.decode_opt()]) ::
  {:ok, map()} | {:error, Jason.DecodeError.t()}

parse_json!(content, opts \\ [])

@spec parse_json!(String.t(), [Jason.decode_opt()]) :: map()

to_rdf(input, options \\ %Options{})