File Information Schemas

JSON-LD

CC-BY-SA
This work is licensed under the Creative Commons Attribution-ShareAlike License 4.0.

Extensions:
.ldjson, .jsonld.
Media Type:
application/ld+json
IANA Media Type Template:
https://iana.org/assignments/media-types/application/ld+json
Latest Version:
index.shtml

Summary

JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON. One goal for JSON-LD was to require as little effort as possible from developers to transform their existing JSON to JSON-LD. JSON-LD allows data to be serialized in a way that is similar to traditional JSON. 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, and is currently maintained by the JSON-LD Working Group. JSON-LD is a World Wide Web Consortium (W3C) Recommendation.

Design

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 a HTTP Link: header).

Relationship to RDF

JSON-LD is a concrete RDF syntax. Hence, a JSON-LD document is both an RDF document and a JSON document and correspondingly represents an instance of an RDF data model. However, JSON-LD also extends the RDF data model to optionally allow JSON-LD to serialize generalized RDF Datasets.

Use

The encoding is used by Schema.org, Google Knowledge Graph, and used mostly for search engine optimization activities. It has also been used for applications such as biomedical informatics, and representing provenance information. It is also the basis of Activity Streams, a format for “the exchange of information about potential and completed activities”, and is used in ActivityPub, the federated social networking protocol. Additionally, it is used in the context of Internet of Things (IoT), where a Thing Description, which is a JSON-LD document, describes the network facing interfaces of IoT devices.

Glossary

Words and terms introduced and in this document.

ontology:
  1. (philosophy) The branch of metaphysics that addresses the nature or essential characteristics of being and of things that exist; the study of being qua being.
  2. (philosophy) In a subject view, or a world view, the set of conceptual or material things or classes of things that are recognised as existing, or are assumed to exist in context, and their interrelations; in a body of theory, the ontology comprises the domain of discourse, the things that are defined as existing, together with whatever emerges from their mutual implications.
  3. (philosophy) The theory of a particular philosopher or school of thought concerning the fundamental types of entity in the universe.
  4. (logic) A logical system involving theory of classes, developed by Stanisław Leśniewski (1886-1939).
  5. (computer science, information science) A structure of concepts or entities within a domain, organized by relationships; a system model.
Examples (Concepts in ontologies of various subject or world views):
Atoms, molecules, ions and electrons occur in the ontology of chemistry.
Witches, magic, and unlucky numbers occur in the ontology of superstitions.
Theorems, constants, and variables occur in the ontologies of axiomatic structures.
See also the English Wiktionary page on “ontology”, and the English Wikipedia pages on “Ontology” and “Ontology (information science)”.

References and Further Reading