JSON-LD RDF API describes access methods for transforming and abstract RDF represention into JSON-LD and back..
This document is an experimental work in progress.
This document is a detailed specification for Linked Data in JSON. The document is primarily intended for the following audiences:
The intent of the Working Group and the Editors of this specification is to eventually align terminology used in this document with the terminology used in the RDF Concepts document to the extent to which it makes sense to do so. In general, if there is an analogue to terminology used in this document in the RDF Concepts document, the preference is to use the terminology in the RDF Concepts document.
The following is an explanation of the general terminology used in this document:
@graphkeyword and is the top-most
There are a number of ways that one may participate in the development of this specification:
This API extends the API defined in [[!JSON-LD-API]]. It is inprovides a clean mechanism that enables developers to convert JSON-LD data to various RDF formats to allow greater interoperability with Linked Data applications. If a JSON-LD API with the RDF extension is provided in a programming environment, the entirety of the following API MUST be implemented.
The JSON-LD processor interface is the high-level programming structure that developers use to access the JSON-LD transformation methods.
The JSON-LD API signatures are the same across all programming languages. Due
to the fact that asynchronous programming is uncommon in certain languages, developers MAY
implement a processor with a synchronous interface instead. In that case, the
parameter MUST NOT be included and the result MUST be returned as a return value instead.
notType, which if set to
rdf:typeas a property, instead of
inputaccording to the Convert to RDF Algorithm defined in [[!JSON-LD-API]], calling the provided
inputhas been converted to
@context. For example, if a
@typekey maps to anything other than
Developers should note that the details of error handling and conformance handling are being actively debated.
JSON-LD processors utilize a variety of callbacks in order to return information in an asynchronous manner to calling applications. This section details the parameters sent to those callbacks as well as the desired operation of the callbacks.
The QuadCallback is called whenever the processor generates a quad during processing.
null, then no error occurred. If the value is non-
null, a processing error occurred and the details will be contained within the
The following data structures are used for representing data about RDF quads. They are used for normalization, and RDF conversion.
The IRI datatype represents an
The Quad interface represents an RDF Quad. An RDF Quad is an
[[!RDF-CONCEPTS]] with an optional fourth element, the graph name, being a
_: and an implementation dependent,
auto-generated suffix that is unique to all information associated with the
identifierMUST NOT be relied upon in any way between two separate processing runs of the same document or with a different document.
Developers and authors must not assume that the
value of a
Implementers MUST ensure that BlankNode values are unique
within the current environment, two
Literals represent values such as numbers, dates and strings in
RDF data. A
datatypespecified by an
Literals representing plain text in a natural language may have a
language tag specified by a string token, as specified in
[[!BCP47]], normalized to lowercase
They also have a datatype attribute such as
If unspecified, the
datatype defaults to
Literals representing values with a specific datatype, such as
the integer 72, may have a
datatype attribute specified in the form
of a IRI (e.g.,
See[[!RDF-CONCEPTS]] definition for literal.