JSON-LD

From IndieWeb


JSON-LD is a method of encoding RDF (aka "Linked Data") as JSON. It makes special points of IDing resources with URIs, and of including the URIs of schema-like "contexts" for vocabularies defined by a variety of sources.

Manu Sporny has released a number of introductory videos (hosted on YouTube):

And written about the origin of the standard and its posision in the Semantic Web and RDF universe, published in the month of W3C 1.0 release of the standard:

Articles

See Also

  • Users of JSON LD (archived 2018-01-20) from the JSON-LD GitHub wiki.
  • ActivityPub and Activity Streams 2 make use of JSON-LD to serialise their objects.
  • JSON-LZ (JSON LaZy), an alternative “self-describing” format.
  • 2018-08-10 Christine Lemmer-Webber: “I ought to say some things about json-ld, […]” (archived) where some commonly seen misunderstandings of JSON-LD are addressed in short.
  • JSON-LD playground with some examples and various representations of them
  • Criticism: Requires DRY violation maintenance https://twitter.com/ferkungamaboobo/status/1090239329694351360
    • "My challenge with JSON-LD is that it's hard to automate and hard to make sure there's content parity between the JSON & the content on the page, so I'd rather just mark up the HTML, and use the semantics of the HTML to guide the semantics of the structured data." @ferkungamaboobo January 29, 2019
  • does not support nested lists https://www.w3.org/TR/json-ld/#h_note_8
  • Criticism: Implementation Complexity: 2018-08-07 https://pleroma.site/notice/2967381

    The complexity of implementing JSON-LD properly is so great that neither mastodon or pleroma really attempt to implement it. And on top of that, the overly-flexible nature of JSON-LD almost excludes statically typed languages from describing it at all. It also proves impossible to bound the memory consumption of your JSON-LD parser, making DoS attacks certain.

  • Criticism: JSON-LD data islands "unable to match content to the multiple schema" https://twitter.com/StockbridgeT/status/1154623574243782656
    • ""Multiple reviews" and "unable to match content to the multiple schema." This is why I'm confused on the push to JSON over RDFa or Microformats. In the latter two types, you mark up the relevant content itself, so there would be no confusion." @StockbridgeT July 26, 2019
  • 2022-02-11 Ariadne Conill: JSON-LD is ideal for Cloud Native technologies (archived) on how JSON-LD could be used outside of the web.
    • Frequently I have been told by developers that it is impossible to have extensible JSON documents underpinning their projects, because there may be collisions later. [...] I would like to introduce you all to JSON-LD, [...] as well as how one might use JSON-LD to extend something like OCI container manifests.

    • You might feel compelled to look up JSON-LD on Google before continuing with reading this. My suggestion is to not do that, because the JSON-LD website is really aimed towards web developers, and this explanation will hopefully explain how a systems engineer can make use of JSON-LD graphs in practical terms.

  • Criticism: YAGNI, Google does not care about the LD part: https://twitter.com/samuelgoto/status/1589046592199622656
    • "Can confirm.

      I wrote a significant part of the processing pipeline (10 years ago, likely replaced) as well as the schemas that are used in search (also 10 years ago, but likely still used) and we wouldn't know the difference between JSON and JSON-LD." @samuelgoto November 6, 2022
  • Criticism: merely hides the complexity of RDF, does not improve its legibility: From the AT Protocol FAQ: Why create Lexicon instead of using JSON-LD or RDF?

    JSON-LD simplifies the task of consuming RDF vocabularies, but it does so by hiding the underlying concepts, not by making RDF more legible.

  • https://hachyderm.io/@jenniferplusplus/111343003922627346
    • "@tchambers
      It seems like the trend in dynamically typed languages is to just let dynamic typing do the hardest parts.And I'm sure there are some projects actually using JSON-LD processing. I explored doing that, but I find it's more trouble than it's worth, and processing AP messages as linked data takes hundreds of times longer than not.@hazel @hrefna @maegul" @jenniferplusplus November 2, 2023
  • Criticism: https://hachyderm.io/@hrefna/116121486165715666
  • Giving up on JSON-LD in a website rewrite: https://mastodontech.de/@jak2k/116235644734516919
    • "I will probably cancel my current (very JSON-LD focused) website rewrite. It is not very nice to work with when editing *and* coding.
      I'll do the next one in Rust too. But this time, I'll create one giant KDL file to configure everything (pages, colllections, feeds, …). I'll might also create a new URL structure (while redirecting all old ones) and add a native comment system. I'll definitely do a design refresh and restructure my navigation and footer.(1/2)
      #website #personalBlog #indieweb" @jak2k March 15, 2026