| JSON-LD | |
|---|---|
| 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.1 /JSON-LD 1.1 API |
| Open format? | Yes |
| JSON-LD 1.1 | |
|---|---|
| Abbreviation | JSON-LD |
| Status | W3C Recommendation |
| Year started | 2010 |
| Editors | Editors
Previous editors
|
| Authors | Manu Sporny, Dave Longley, Gregg Kellogg, Markus Lanthaler, Niklas Lindström |
| Base standards | |
| Domain | Semantic Web,Data Serialization |
| Website | |
JSON-LD (JavaScript Object Notation for Linked Data) is a method of encodinglinked data usingJSON and of serializing data similarly to traditional JSON.[1] It is meant to be simple to create by modifying JSON documents.[2] JSON-LD is aWorld Wide Web Consortium Recommendation initially developed by the JSON for Linking Data Community Group,[3] transferred to the RDF Working Group[4] for review, improvement and standardization,[5] and now maintained by the JSON-LD Working Group.[6]
JSON-LD is based on the concept of a "context" that maps JSON object properties to concepts in anontology using anRDF 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 anHTTP Linkheader.
{"@context":{"name":"http://xmlns.com/foaf/0.1/name","homepage":{"@id":"http://xmlns.com/foaf/0.1/workplaceHomepage","@type":"@id"},"Person":"http://xmlns.com/foaf/0.1/Person"},"@id":"https://me.example.com","@type":"Person","name":"John Smith","homepage":"https://www.example.com/"}
The example above describes a person, based on theFOAF (friend of a friend) ontology. First, the two JSON propertiesname andhomepage and the typePerson are mapped to concepts in the FOAF vocabulary and the value of thehomepage property is specified to be of the type@id. In other words, the homepage id is specified to be anIRI in the context definition. Based on the RDF model, this allows the person described in the document to be unambiguously identified by anIRI. The use of resolvable IRIs allows RDF documents containing more information to betranscluded which enables clients to discover new data by following those links; this principle is known as 'Follow Your Nose'.[7]
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.
The encoding is used bySchema.org,[8]Google Knowledge Graph,[9][10] and used mostly forsearch engine optimization activities. It has also been used for applications such asbiomedical informatics,[11] and representingprovenance information.[12] It is also the basis ofActivity Streams, a format for "the exchange of information about potential and completed activities",[13] and is used inActivityPub, the federated social networking protocol.[14] Additionally, it is used in the context ofInternet of Things (IoT), where a Thing Description,[15] which is a JSON-LD document, describes the network facing interfaces of IoT devices.