The JSON-LD I populate from the same data that I use to generate my site, and I use the JSON-LD metadata to generate things like index pages (list of blog posts from 2024, all posts related to topic X, etc). The main consumers of JSON-LD are search engines.
If you are interested in getting offended, then think about how we are also putting OpenGraph metadata in our web pages. Two different metadata formats for the same page.
I had misunderstood the type field, because to me I was often just linking to a webpage, even if it is for a saas, the marketing page is still a webpage.
https://developers.google.com/search/docs/appearance/structu...
You’ll also notice that a lot of the information is relevant to only a small subset of sites. Rotten Tomatoes can publish the critic rating for movies using JSON-LD, but that’s not relevant for me (even if I write a review for a movie).
JSON-LD is nice because it’s easy and it is actually used by search engines. Yes, it can duplicate information in the web page itself, but I think the dream of perfectly annotating information so it only appears exactly once in your document is, well, a dream of spherical cows and massless ropes. It takes human effort to make a webpage and I am ok with a little duplication in the final product. My <h1> duplicates information in <title> anyway.
mananaysiempre•1h ago
panzi•42m ago
9dev•37m ago
captn3m0•27m ago
klodolph•18m ago
I think you should just think about what metadata you actually care about, and the main metadata I care about (choose your own list) is authorship, publish date, last update, subject keywords, thumbnail (OpenGraph 1200x630), and summary.
There’s a long list of additional metadata that I could put in my webpages because there are standardized ways to do it, but, why bother?
jauco•5m ago
Json-ld says: if you want to know whether the “title” property means the schema.org or the dublin core variant then you can find out which it is by <json-ld algorithm>
So you’d always use json-ld _with_ schema.org or something.
alwillis•4m ago
For example, there's no explicit property in schema's Person type [1] for a nickname. But the FOAF standard does [2].
Just add FOAF to the JSON-LD context:
You now use the FOAF nickname property: [1]: https://schema.org/Person[2]: https://xmlns.com/foaf/spec/#term_nick
klodolph•26m ago
I tried using RDFa and liked the property that it was theoretically less redundant, but switched to JSON-LD because it JSON-LD is just easier to get working. And this is speaking as somebody who uses a hand-rolled static site generator—the issue here is that whether information is present in the raw HTML is something contextual, and if something isn’t present in the HTML then you need to put it somewhere else or it’s not mechanically parseable from the page. Like, to a human reader, a post on “Alice’s Blog” is assumed to be authored by Alice, so I may omit the “by Alice” text from the document, and then I would want to put that metadata in the page some other way.
Putting the metadata in JSON-LD lets me just be dumb about it. The metadata is always in JSON-LD, and the HTML may or may not contain an explicit representation of that same metadata. Easy.
But the JSON-LD does not need to contain the URL of the page (which is <link rel=canonical>) or the title (which is in <title>), for example.