JSON-LD
This article is a stub. You can help the IndieWeb wiki by expanding it with relevant information.
JSON-LD is a method of encoding RDF (aka "Linked Data") as JSON and has been highly criticized for the burdens it places on developers, especially in the context of ActivityPub and ActivityStreams.
Criticism
This section is a stub. You can help the IndieWeb wiki by expanding it.
This section needs expansion by extracting criticism articles from the below sections and clustering them by areas of primary criticism in this section.
- 2017-05-25 : No Namespaces in JSON, Please (archived)
...
Articles
- 2016-12-17 : Why Microformats? Owning My Reviews (archived), describes how Google consumes JSON-LD since 2016.
- 2013-08-08 : JSON-LD is an Unneeded Spec (archived)
History
Manu Sporny has released a number of introductory videos (hosted on YouTube):
- 2012-06-19 What is JSON-LD?
- 2015-02-17 JSON-LD: Core Markup
- 2015-02-17 JSON-LD: Compaction and Expansion
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:
- 2014-01-19 The Origins of JSON-LD (archived)
- 2014-01-21 JSON-LD and Why I Hate the Semantic Web (archived)
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-01 : Design Β§ Why don't we just use JSON-LD? (archived)
- 2018-08-10 : β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 : 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
- "Can confirm.
- 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
- "@tchambers
- 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
- "I will probably cancel my current (very JSON-LD focused) website rewrite. It is not very nice to work with when editing *and* coding.
- Criticism: https://hachyderm.io/@hrefna/116121486165715666
Let me talk, following on @thisismissem's post, about JSON-LD from a data engineering and web backend perspective:
It's a nightmare.
First: one of the first things you learn about how to address the OWASP lists is the importance of not just accepting random payloads, but carefully validating them, but with JSON-LD:
- Basically any field may be absent, present, a URI, a list of objects, a list of URIs of objects, a list containing URIs AND Objects, etc.
- Fields do not have consistent names. BY DESIGN. You _have_ to parse an object to know what is in it. Parsing the context and then building the map of names is basically an Ξ(n*m) process where the amount of processing time you spend is _under the control of the sender_ by default, and nothing is ever fully defined.
- Actually fully validating an object to the degree of knowing if it is the same thing as something else requires solving a GI-hard problem if there are blank nodes.
Applying basic type theory to anything done with JSON-LD is an exercise in frustration.
There are certainly use cases for it, but 99% of the time when I've seen it being used it is not for those use cases, but for use cases where we would strongly prefer JSON-Schema and/or OpenAPI definitions for things.