Jump to content

JSON-LD

From Wikipedia, the free encyclopedia
JSON-LD
Filename extension
.jsonld
Internet media type
application/ld+json
Type of formatSemantic Web
Container forLinked Data
Extended fromJSON
StandardJSON-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
DomainSemantic Web, Data Serialization
Website

JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON.[1] A stated design goal was to make linked data accessible to ordinary web developers, who can create it by modifying ordinary JSON documents without the specialised tooling associated with earlier RDF serializations.[2][3] JSON-LD is a World Wide Web Consortium Recommendation initially developed by the JSON for Linking Data Community Group,[4] transferred to the RDF Working Group[5] for review, improvement and standardization,[6] and now maintained by the JSON-LD Working Group.[7]

History

[edit]

JSON-LD 1.0 was published as a W3C Recommendation in January 2014, after being advanced by the RDF Working Group. Independent coverage at the time noted that reaching Recommendation status had taken about four years of work.[8] A revised version, JSON-LD 1.1, was published as a Recommendation in July 2020, at which point version 1.0 became a Superseded Recommendation.[9]

Design

[edit]

JSON-LD is based on the concept of a "context" that maps JSON object properties to concepts in an ontology using an RDF model.[10] 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, letting a plain JSON document carry RDF semantics while remaining ordinary JSON to applications that do not process the context.[10]

Because two JSON-LD documents can express the same information while differing in field order, applications that need to verify integrity apply a canonical form before signing. The W3C RDF Dataset Canonicalization specification defines such a canonical serialization, allowing digital proofs to be computed over the underlying RDF graph rather than over a particular text file.[11] This mechanism underpins the signing of Verifiable Credentials.[12]

Example

[edit]
{
  "@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 describes a person using the FOAF (friend of a friend) ontology: the context maps the name and homepage properties and the Person type to FOAF concepts and marks homepage as an IRI, so the subject can be unambiguously identified. Because such IRIs are resolvable, clients can follow them to transclude and discover further linked data, a principle known as 'Follow Your Nose'.[13]

Use

[edit]

The encoding is used by Schema.org,[14] Google Knowledge Graph,[15][16][17] and used mostly for search engine optimization activities.[18] Google recommends JSON-LD for structured-data markup where a site's setup allows it, describing it as the easiest format to implement and maintain at scale,[19] and surveys of web crawl data have found it to be the most widely adopted structured-data format, ahead of Microdata and RDFa.[20]

It has also been used for applications such as biomedical informatics,[21] and representing provenance information.[22] A JSON-LD serialization of the PROV data model, PROV-JSONLD, allows provenance data to be exchanged as JSON while preserving RDF semantics.[23] It is also the basis of Activity Streams, a format for "the exchange of information about potential and completed activities",[24] and is used in ActivityPub, the federated social networking protocol, which requires JSON-LD as the encoding for social network data.[25] It is also used in the Internet of Things, where a Thing Description, a JSON-LD document, describes the network-facing interfaces of a device.[26]

See also

[edit]

References

[edit]
  1. ^ "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.
  2. ^ "JSON-LD Syntax 1.1". 2010-07-16. Retrieved 2020-12-10.
  3. ^ Sporny, Manu (2014-01-22). "JSON-LD and Why I Hate the Semantic Web". The Beautiful, Tormented Machine.
  4. ^ "JSON for Linking Data Community Group". json-ld.org.
  5. ^ "RDF Working Group". w3.org.
  6. ^ "JSON-LD 1.0, A JSON-based Serialization for Linked Data, W3C Recommendation 16 January 2014". 2014-01-16. Retrieved 2020-12-10.
  7. ^ "JSON-LD Working Group". w3.org.
  8. ^ Janssen, Thomas (February 2014). "JSON-LD Reaches W3C Recommendation Status". InfoQ.
  9. ^ "JSON-LD 1.1 Specifications are W3C Recommendations". World Wide Web Consortium. July 2020.
  10. ^ a b Kellogg, Gregg; Champin, Pierre-Antoine; Longley, Dave (2020-07-16). "JSON-LD 1.1: A JSON-based Serialization for Linked Data" (W3C Recommendation). World Wide Web Consortium.
  11. ^ "RDF Dataset Canonicalization" (W3C Recommendation). World Wide Web Consortium. 2024.
  12. ^ Longley, Dave; Sporny, Manu (2025). "Verifiable Credential Data Integrity 1.0" (W3C Recommendation). World Wide Web Consortium.
  13. ^ "Linked Data Patterns, Chapter 5: Follow Your Nose". 2023-06-07. Retrieved 2023-06-07.
  14. ^ "Data Model". Schema.org. Retrieved 2018-06-20.
  15. ^ "Understanding structured data". Bendev Junior. 14 June 2022.
  16. ^ "Method Entities in Search". Google Developers. Retrieved 2017-10-17.
  17. ^ "Structured data and JSON-LD requirements for Google Knowledge Panels". Lindy Panels. 2024-02-14. Retrieved 2026-05-08.
  18. ^ "Wikidata, the Knowledge Graph and entity-based SEO". WBTechInsights. Retrieved 2026-06-10.
  19. ^ "Intro to How Structured Data Markup Works". Google Search Central. Google. 2024.
  20. ^ Brinkmann, Alexander (2024). "Microdata, RDFa, JSON-LD, and Microformat Data Sets". Web Data Commons, University of Mannheim.
  21. ^ 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.
  22. ^ Huynh, Trung Dong; Michaelides, Danius T.; Moreau, Luc (2016). "PROV-JSONLD: A JSON and linked data representation for provenance" (PDF). In Mattoso, Marta; Glavic, Boris (eds.). Provenance and annotation of data and processes: 6th International Provenance and Annotation Workshop, IPAW 2016, McLean, VA, USA, June 7-8, 2016, Proceedings. Lecture Notes in Computer Science. Vol. 9672. Cham: Springer International Publishing. pp. 173–177. doi:10.1007/978-3-319-40593-3_15. ISBN 978-3-319-40592-6. S2CID 44036472.
  23. ^ Moreau, Luc (2021). "The PROV-JSONLD Serialization: A JSON-LD Representation for the PROV Data Model". Provenance and Annotation of Data and Processes. Lecture Notes in Computer Science. doi:10.1007/978-3-030-80960-7_4.
  24. ^ Prodromou, Evan (May 2017). "Activity Streams 2.0". W3C Recommendation – via W3C.
  25. ^ Tallon, Jessica (Jan 2018). "ActivityPub". W3C Recommendation – via W3C.
  26. ^ "Web of Things (WoT) Thing Description, W3C Proposed Recommendation". www.w3.org. Retrieved 2020-03-26.
[edit]