Will Google accept combined JSON-LD and HTML meta/microdata?

1.1k views Asked by At

I have a situation where I can put 99% of my structured data into JSON-LD in the of my product pages. But the only way I can get the UPC is to place it inline as microdata.

Will Google aggregate the product data from the JSON-LD and the inline microdata?

3

There are 3 answers

0
unor On

Most likely yes.

  • Google’s Structured Data Testing Tool works fine if you are using JSON-LD and Microdata (and RDFa).

  • Google does not say otherwise (they did in the past), see their Structured Data Policies:

    The data may be embedded in your webpage using any of three supported formats: JSON-LD, RDFa, and microdata.

  • Some of Google’s structured data features are (currently) only documenting JSON-LD (for example, TV and Movie Watch Actions); for others, Google recommends using RDFa/Microdata, see for example their "About schema.org":

    […] Google recommends the use of JSON-LD for those features. For the remaining Rich Snippets types and breadcrumbs, Google recommends the use of microdata or RDFa.

    It wouldn’t make sense for Google to restrict authors so that can’t make use of all the features (using different syntaxes) in the same document.

That said, you can never know for sure (their documentation is not always up-to-date, and their rules might change each day.)

0
Vikram On

One can use both in same page. But may not divide the info of one type of entity into parts ..example: some info about the product in JSON-LD format and some in microdata format does not work.

Also two separate things would mean two entities. Although one may use @id in JSON-LD and itemid in microdata to specify them as same entity but the Google’s Structured Data Testing Tool still shows them as two entities.

0
KHAYRI R.R. WOULFE On

You can combine all three formats in a single page but Google gives more priority to JSON-LD and will take data from JSON-LD format shall the other one (or two) have different values than the former.