JSON-LD

Last updated
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
AbbreviationJSON-LD
StatusW3C Recommendation
Year started2010
Editors
Editors
    • Gregg Kellogg
    • Pierre-Antoine Champin
    • Dave Longley
Previous editors
    • Manu Sporny
    • Markus Lanthaler
AuthorsManu 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 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. [1] JSON-LD allows data to be serialized in a way that is similar to traditional JSON. [2] It was initially developed by the JSON for Linking Data Community Group [3] before being transferred to the RDF Working Group [4] for review, improvement, and standardization, [5] and is currently maintained by the JSON-LD Working Group. [6] JSON-LD is a World Wide Web Consortium Recommendation.

Contents

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

Example

{"@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 transcluded which enables clients to discover new data by simply 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.

Use

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

See also

Related Research Articles

<span class="mw-page-title-main">Semantic Web</span> Extension of the Web to facilitate data exchange

The Semantic Web, sometimes known as Web 3.0, is an extension of the World Wide Web through standards set by the World Wide Web Consortium (W3C). The goal of the Semantic Web is to make Internet data machine-readable.

The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data. RDF provides a variety of syntax notations and data serialization formats, with Turtle currently being the most widely used notation.

XML Linking Language, or XLink, is an XML markup language and W3C specification that provides methods for creating internal and external links within XML documents, and associating metadata with those links.

RDF Schema (Resource Description Framework Schema, variously abbreviated as RDFS, RDF(S), RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation data model, providing basic elements for the description of ontologies. It uses various forms of RDF vocabularies, intended to structure RDF resources. RDF and RDFS can be saved in a triplestore, then one can extract some knowledge from them using a query language, like SPARQL.

SPARQL is an RDF query language—that is, a semantic query language for databases—able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. It was made a standard by the RDF Data Access Working Group (DAWG) of the World Wide Web Consortium, and is recognized as one of the key technologies of the semantic web. On 15 January 2008, SPARQL 1.0 was acknowledged by W3C as an official recommendation, and SPARQL 1.1 in March, 2013.

<span class="mw-page-title-main">FOAF</span> Semantic Web ontology to describe relations between people

FOAF is a machine-readable ontology describing persons, their activities and their relations to other people and objects. Anyone can use FOAF to describe themselves. FOAF allows groups of people to describe social networks without the need for a centralised database.

GRDDL is a markup format for Gleaning Resource Descriptions from Dialects of Languages. It is a W3C Recommendation, and enables users to obtain RDF triples out of XML documents, including XHTML. The GRDDL specification shows examples using XSLT, however it was intended to be abstract enough to allow for other implementations as well. It became a Recommendation on September 11, 2007.

RDFa or Resource Description Framework in Attributes is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within Web documents. The Resource Description Framework (RDF) data-model mapping enables its use for embedding RDF subject-predicate-object expressions within XHTML documents. It also enables the extraction of RDF model triples by compliant user agents.

An RDF query language is a computer language, specifically a query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format.

N-Triples is a format for storing and transmitting data. It is a line-based, plain text serialisation format for RDF graphs, and a subset of the Turtle format. N-Triples should not be confused with Notation3 which is a superset of Turtle. N-Triples was primarily developed by Dave Beckett at the University of Bristol and Art Barstow at the World Wide Web Consortium (W3C).

<span class="mw-page-title-main">Web Services Description Language</span> XML-based interface description language

The Web Services Description Language is an XML-based interface description language that is used for describing the functionality offered by a web service. The acronym is also used for any specific WSDL description of a web service, which provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns. Therefore, its purpose is roughly similar to that of a type signature in a programming language.

Microdata is a WHATWG HTML specification used to nest metadata within existing content on web pages. Search engines, web crawlers, and browsers can extract and process Microdata from a web page and use it to provide a richer browsing experience for users. Search engines benefit greatly from direct access to Microdata because it allows them to understand the information on web pages and provide more relevant results to users. Microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties. Microdata is an attempt to provide a simpler way of annotating HTML elements with machine-readable tags than the similar approaches of using RDFa and microformats.

<span class="mw-page-title-main">Named graph</span> Extension of the RDF data model

Named graphs are a key concept of Semantic Web architecture in which a set of Resource Description Framework statements are identified using a URI, allowing descriptions to be made of that set of statements such as context, provenance information or other such metadata.

XHTML+RDFa is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents. XHTML+RDFa is one of the techniques used to develop Semantic Web content by embedding rich semantic markup. Version 1.1 of the language is a superset of XHTML 1.1, integrating the attributes according to RDFa Core 1.1. In other words, it is an RDFa support through XHTML Modularization.

Schema.org is a reference website that publishes documentation and guidelines for using structured data mark-up on web-pages. Its main objective is to standardize HTML tags to be used by webmasters for creating rich results about a certain topic of interest. It is a part of the semantic web project, which aims to make document mark-up codes more readable and meaningful to both humans and machines.

<span class="mw-page-title-main">Asset Description Metadata Schema</span>

The Asset Description Metadata Schema (ADMS) is a common metadata vocabulary to describe standards, so-called interoperability assets, on the Web.

Linked Data Notifications (LDN) is a W3C Recommendation that describes a communications protocol based on HTTP, URI, and RDF on how servers (receivers) can receive messages pushed to them by applications (senders), as well as how other applications (consumers) may retrieve those messages. Any web resource can advertise a receiving endpoint (inbox) for notification messages. Messages are expressed in RDF, and can contain arbitrary data.

The PROV standard defines a data model, serializations, and definitions to support the interchange of provenance information on the Web. Here provenance includes all "information about entities, activities, and people involved in producing a piece of data or thing, which can be used to form assessments about its quality, reliability or trustworthiness".

<span class="mw-page-title-main">Thing Description</span>

The Thing Description (TD) (or W3C WoT Thing Description (TD)) is a royalty-free, open information model with a JSON based representation format for the Internet of Things (IoT). A TD provides a unified way to describe the capabilities of an IoT device or service with its offered data model and functions, protocol usage, and further metadata. Using Thing Descriptions help reduce the complexity of integrating IoT devices and their capabilities into IoT applications.

<span class="mw-page-title-main">Verifiable credentials</span>

Verifiable credentials (VCs) are digital credentials which follow the relevant World Wide Web Consortium open standards. They can represent information found in physical credentials, such as a passport or license, as well as new things that have no physical equivalent, such as ownership of a bank account. They have numerous advantages over physical credentials, most notably that they're digitally signed, which makes them tamper-resistant and instantaneously verifiable.

References

  1. "JSON-LD Syntax 1.1". 2010-07-16. Retrieved 2020-12-10.
  2. "On Using JSON-LD to Create Evolvable RESTful Services"., M. Lanthaler and C. Gütl in Proceedings of the 3rd International Workshop on RESTful Design (WS-REST 2012) at WWW2012.
  3. "JSON for Linking Data Community Group". json-ld.org.
  4. "RDF Working Group". w3.org.
  5. JSON-LD 1.0, A JSON-based Serialization for Linked Data, W3C Recommendation 16 January 2014, 2014-01-16, retrieved 2020-12-10
  6. "JSON-LD Working Group". w3.org.
  7. "Linked Data Patterns, Chapter 5: Follow Your Nose". 2023-06-07. Retrieved 2023-06-07.
  8. "Data Model". Schema.org. Retrieved 2018-06-20.
  9. "Understanding structured data". Bendev Junior. 14 June 2022.
  10. "Method Entities in Search". Google Developers. Retrieved 2017-10-17.
  11. Xin, Jiwen; Afrasiabi, Cyrus; Lelong, Sebastien; Adesara, Julee; Tsueng, Ginger; Su, Andrew I.; Wu, Chunlei (2018-02-01). "Cross-linking BioThings APIs through JSON-LD to facilitate knowledge exploration". BMC Bioinformatics. 19 (1): 30. doi: 10.1186/s12859-018-2041-5 . PMC   5796402 . PMID   29390967.
  12. Huynh, Trung Dong; Michaelides, Danius T.; Moreau, Luc (2016), PROV-JSONLD: A JSON and Linked Data Representation for Provenance (PDF), Lecture Notes in Computer Science, vol. 9672, Springer International Publishing, pp. 173–177, doi:10.1007/978-3-319-40593-3_15, ISBN   9783319405926, S2CID   44036472
  13. Prodromou, Evan (May 2017). "Activity Streams 2.0". W3C Recommendation via W3C.
  14. Tallon, Jessica (Jan 2018). "ActivityPub". W3C Recommendation via W3C.
  15. "Web of Things (WoT) Thing Description, W3C Proposed Recommendation". www.w3.org. Retrieved 2020-03-26.