SEO
What is JSON-LD and why is it preferred?
JSON-LD is a block of JSON inside a script tag describing what a page is about. Google recommends it over Microdata and RDFa because it sits apart from the visible markup, so a design change cannot silently break it.
Why format choice matters
Microdata is woven through the HTML as attributes. When someone restructures a template, the markup breaks and nobody notices because nothing looks different. JSON-LD is self-contained, reviewable and far more durable.
Getting the shape right
- One script tag containing one @graph array
- Every node given an @id, so others can reference it
- References written as bare { "@id": "..." } objects
- Absolute URLs matching your canonical exactly
- Validated with both the Schema Markup Validator and the Rich Results Test
Range errors validators forgive
email must be Text — a mailto: prefix makes consumers emit mailto:mailto:. primaryImageOfPage accepts only ImageObject. telephone should be E.164 everywhere. dateModified must reflect content, not the deploy.
The longer version
This answer is deliberately short. If you want the full treatment, Schema markup that does something, and the kind that risks a penalty covers it in about 3 minutes — free, ungated, written from client work.
Who answered this
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan — fifteen live client sites, six of them stores taking real payments. These answers come from those projects rather than from a content brief. More about how I work, or ask me something directly.