JSON-LD
JSON-LD (JavaScript Object Notation for Linked Data) is the Google-preferred format for structured data: a script block of linked-data JSON, placed in a page, that describes the entity on that page to search engines without touching the visible HTML.
JSON-LD lives in a script tag with the type application/ld+json, usually in the head or body of the page. Because it sits apart from the rendered markup, it does not interleave attributes through your HTML the way microdata and RDFa do, which is why Google recommends it and why it is the easiest format to add, audit, and remove without disturbing the layout. Each block is a self-contained object with an @context that points to the schema.org vocabulary and an @type that names the entity, so a machine can read the page as data rather than guessing meaning from the prose.
A single block can describe a product, an article, an organisation, a breadcrumb trail, or aggregated review ratings, and several blocks can coexist on one page. The format is just JSON, so it is straightforward for a template to generate and for a validator to read, and it can be injected after page load by tag managers when you cannot edit the template directly. You can also link entities by reference using @id, so a Product block can point to the Organisation that sells it without repeating the brand details in full.
Consider a Shopify store selling a single-origin coffee. The product template renders an AggregateRating block carrying ratingValue of 4.7 across reviewCount of 213, an Offer block with price 18.00 and priceCurrency GBP and availability set to InStock, and a separate Organisation block on every page describing the roastery and its logo. When the merchant runs a flash sale, the theme must regenerate the price in the JSON at the same moment it changes the price on the page, otherwise the two fall out of step. If a product sells out, availability has to flip to OutOfStock in the markup as well, or Google may keep showing a price and stock state that no longer hold.
JSON-LD also matters for answer engines. ChatGPT, Perplexity, and Google AI Overviews lean on clean, parseable signals when deciding what a page is about and whether to cite it, and a well-formed block removes ambiguity about the product name, price, rating, and seller. It is not a guarantee of being quoted, and these systems still read the visible text, but structured data lowers the cost of understanding the page and makes the key facts harder to misread.
The honest caveat is that JSON-LD must match what a visitor actually sees. Google treats structured data that claims ratings, prices, or content not present on the page as a guidelines violation, and it can suppress rich results or issue a manual action. Keep the JSON synchronised with visible content, validate it after template changes, and treat it as a faithful description of the page rather than a place to make extra claims.