Class RDFTerm2Json

java.lang.Object
org.apache.jena.sparql.lib.RDFTerm2Json

public class RDFTerm2Json extends Object
General converting of Nodes to JSON.

This is a one way, lossy, conversion from an RDF Term to the best available JSON value.

This is not SPARQL results in JSON (application/result-sets+json).

RDF Term JSON value
URI String
xsd:string String
rdf:langString String (no @lang)
XSD numeric JSON number
xsd:boolean boolean
Literal, other datatype String, no ^^
Unbound JSON null

See also NV for conversion to and from NodeValues for function argument and results.
  • Constructor Details

    • RDFTerm2Json

      public RDFTerm2Json()
  • Method Details

    • fromNode

      public static JsonValue fromNode(org.apache.jena.graph.Node node)