Filename extension | .jsonld |
---|---|
Internet media type | application/ld+json |
Type of format | Semantic Web |
Container for | Linked Data |
Extended from | JSON |
Standard | JSON-LD 1.0 / JSON-LD 1.0 API |
Open format? | Yes |
Status | W3C Recommendation |
---|---|
Year started | 2010 |
Editors | Manu Sporny, Gregg Kellogg, Markus Lanthaler |
Authors | Manu Sporny, Dave Longley, Gregg Kellogg, Markus Lanthaler, Niklas Lindström |
Base standards | JSON, RDF |
Domain | Semantic Web, Data Serialization |
Abbreviation | JSON-LD |
Website | JSON-LD 1.0 |
Status | W3C Recommendation |
---|---|
Year started | 2010 |
Editors | Markus Lanthaler, Gregg Kellogg, Manu Sporny |
Authors | Dave Longley, Gregg Kellogg, Markus Lanthaler, Manu Sporny |
Base standards | JSON-LD |
Domain | Semantic Web, API, Algorithm |
Abbreviation | JSON-LD-API |
Website | JSON-LD 1.0 API |
JSON-LD, or JavaScript Object Notation for Linked Data, is a method of encoding Linked Data using JSON. It was a goal to require as little effort as possible from developers to transform their existing JSON to JSON-LD. This allows data to be serialized in a way that is similar to traditional JSON. It is a World Wide Web Consortium Recommendation. It was initially developed by the JSON for Linking Data Community Group before being transferred to the RDF Working Group for review, improvement, and standardization.
JSON-LD is designed around the concept of a "context" to provide additional mappings from JSON to an RDF model. The context links object properties in a JSON document to concepts in an ontology. In order to map the JSON-LD syntax to RDF, JSON-LD allows values to be coerced to a specified type or to be tagged with a language. A context can be embedded directly in a JSON-LD document or put into a separate file and referenced from different documents (from traditional JSON documents via an HTTP Link header).
The example above describes a person, based on the FOAF vocabulary. First, the two JSON properties name
and homepage
and the type Person
are mapped to concepts in the FOAF vocabulary and the value of the homepage
property is specified to be of the type @id
, i.e., it is specified to be an IRI in the context definition. Based on the RDF model, this allows the person described in the document to be unambiguously identified by an IRI. The use of resolvable IRIs allows RDF documents containing more information to be transcluded which enables clients to discover new data by simply following those links; this principle is known as Follow Your Nose.
By having all data semantically annotated as in the example, an RDF processor can identify that the document contains information about a person (@type
) and if the processor understands the FOAF vocabulary it can determine which properties specify the person’s name and homepage.