Search code examples
schemajson-ld

If using JSON-LD, do you also need to apply the meta/itemprop data for structured data?


Example: I want to set the condition of a product and in my product file I'm currently using JSON-LD and am outputting this:

"itemCondition": "new"

But, do I also need to use this:

<meta itemprop="itemCondition" content="new" />

Can somebody please explain if they work together, or if the JSON-LD is just a different format that outputs the same?


Solution

  • The itemprop attribute is specified in the HTML extension Microdata. Microdata is one of the three structured data syntaxes supported by the Schema.org sponsors. The other two syntaxes are JSON-LD and RDFa.

    Typically only one syntax is used in a document. Unless you have a reason for using mutliple syntaxes, it’s best/easiest to stick to one.

    It’s possible to use multiple syntaxes in the same document. Each syntax could be used to represent the same or different structured data. A possible reason is providing structured data for consumers that only support different syntaxes. Another reason is that software you use generates some structured data in one syntax, but you prefer to use a different syntax for your own structured data.