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., M. Lanthaler and C. Gütl in Proceedings of the 3rd International Workshop on RESTful Design (WS-REST 2012) at WWW2012. 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, transferred to the RDF Working Group for review, improvement and standardization, and now maintained by the JSON-LD Working Group.
"@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 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. In other words, the homepage id 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 Transclusion which enables clients to discover new data by 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.
|
|