Facts About JSON-LD ๐Ÿ“„


JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON and of serializing data similarly to traditional JSON. It is meant to be simple to create by modifying JSON documents.

JSON-LD is a World Wide Web Consortium Recommendation initially developed by the JSON for Linking Data Community Group. It was transferred to the RDF Working Group for review, improvement and standardization, and is now maintained by the JSON-LD Working Group.

๐Ÿ”— Context and Mapping

JSON-LD is based on the concept of a “context” that maps JSON object properties to concepts in an ontology using an RDF model. In order to map the JSON-LD syntax to RDF, JSON-LD allows values to be coerced to a specified type or tagged with a language.

A context can be embedded directly in a JSON-LD document or put into a separate file and referenced from traditional JSON documents via an HTTP Link header.

๐Ÿ‘ค Example and Identification

The example above describes a person, based on the FOAF (friend of a friend) ontology. 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.

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 following those links; this principle is known as ‘Follow Your Nose’.

๐Ÿง  Semantic Annotation

By having all data semantically annotated as in the example, an RDF processor can identify that the document contains information about a person (@type). If the processor understands the FOAF vocabulary it can determine which properties specify the person’s name and homepage.

๐ŸŒ Applications and Usage

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.

Feature Description Standard Body Example Use
Encoding Method Encodes linked data using JSON W3C Recommendation Schema.org
Core Concept “Context” maps properties to ontology concepts JSON-LD Working Group Google Knowledge Graph
Data Model Based on RDF model RDF Working Group Biomedical informatics
Key Principle ‘Follow Your Nose’ via resolvable IRIs JSON for Linking Data Community Group ActivityPub protocol
๐Ÿ” JSON-LD is a W3C standard for encoding linked data in JSON format using a context to map properties to RDF ontologies. It enables unambiguous identification of entities via IRIs and is used by Schema.org, Google Knowledge Graph, and IoT Thing Descriptions. The format also underpins Activity Streams and the ActivityPub federated social networking protocol.