Most structured data parsers miss JSON-LD inside @graph blocks, audit finds
A developer discovered that nine out of twelve structured data audit tools, including their own, fail to detect schema markup when it is wrapped inside a JSON-LD @graph block rather than a flat top-level object. The @graph format is the default output of popular WordPress SEO plugins Yoast SEO and RankMath, meaning a large share of correctly marked-up web pages are being misread as having no structured data. Unlike flat JSON-LD, the @graph structure allows schema nodes to reference each other by ID, forming a single linked entity graph rather than isolated, redundant blocks. The author identified the bug in their own tool after a well-marked page returned a zero schema score, and traced the root cause to parsers checking only for a top-level @type field. A fix involving recursive node iteration — handling both flat and @graph shapes at the parse boundary — is proposed so that no downstream check needs to account for either format separately.
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