Adding JSON-LD structured data to Next.js 16 App Router pages: key pitfalls
A developer tested JSON-LD implementation for SoftwareApplication and FAQPage schemas in a fresh Next.js 16.5.0 project using React 19.3.1 and TypeScript. Injecting raw data via a script tag broke the markup when strings contained a closing script sequence, causing hydration errors and invalid JSON in production and development builds. Escaping the less-than character as \u003c fixed the problem, and placing site-wide entities in the root layout with page entities in the page file was recommended. The author also noted that Google no longer shows rich results for FAQPage and that SoftwareApplication requires a price and a genuine rating or review. The post recommends checking the served HTML rather than only the rendered DOM.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in