Search and SEO
What is JSON-LD?
JSON-LD is the format Google recommends for structured data: a block of JSON inside a script tag in the page head or body. It is preferred over Microdata and RDFa because it lives apart from the visible markup, so a design change cannot silently break it.
Also called: JavaScript Object Notation for Linked Data
Why the format choice matters
Microdata is woven through the HTML as attributes on elements. When a developer restructures a template, the markup breaks and nobody notices because nothing looks different. JSON-LD is a self-contained block, which makes it reviewable and far more durable.
Getting the shape right
- One script tag containing one @graph array, rather than several unrelated blocks
- Every node given an @id so others can reference it
- References written as bare { "@id": "..." } objects
- Absolute URLs throughout, matching your canonical exactly
- Validated with both the Schema Markup Validator and the Rich Results Test — they answer different questions
Range errors validators forgive
- email must be Text. A "mailto:" prefix makes consumers emit mailto:mailto:
- primaryImageOfPage accepts only ImageObject, never a bare URL string
- telephone should be E.164 and identical everywhere on the site
- dateModified must reflect the content, not the deployment
Where this is covered in depth
A definition can only go so far. Schema markup that does something, and the kind that risks a penalty covers this properly — 3 minutes, free, no email required.
Who wrote this
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan. These definitions come from client work rather than from a content brief — where an entry describes a mistake, it is usually one found on a real site. More about how I work.