Google Now Allows Mixing Structured Data Formats

Google announced that it’s okay to merge two kinds of Schema.org structured data now and that it will validate at the major structured data validators.

Now your choices aren’t restricted to exclusively using JSON-LD or Microdata structured data. It’s unclear if RDFa is included although it’s said to validate.

Syntax Graph Merge

Aleyda Solis tweeted the news from Google Search Central Live in Zurich where the announcement was made.

Google made a soft launch last week without announcing it until today.

What This Means In Plain English

The impact is limited to specific use cases where it makes sense. Otherwise if using one type of Schema.org structured data works for you, continue using it.

There are however other use cases where it makes sense to use Schema.org JSON-LD and Microdata format

Difference Between JSON-LD and Microdata Structured Data

JSON-LD is a script that can go in the head section of the HTML (along with other meta data like the title and description) or it can go anywhere in the body of the webpage. JSON-LD structured data is preferred because it’s easy to maintain, easy to read and troubleshoot and is separate from the HTML.

Microdata is markup that integrates with HTML as attributes of elements.

This means, for example, that you can have a heading element (H1, H2, etc.) that could contain a Microdata attribute.

This is what an H2 with Microdata looks like:

<h2 itemprop=”name”>Name of a Movie</h2>

A widescale use case is to communicate to Google exactly what your main content is without bloating your JSON-LD structured data (and HTML size) by reproducing the main content in the JSON-LD.

Now you can communicate to Google what the main content is (when using the Article structured data) with Microdata format of structured data without having to create a duplicate of all the content inside of the JSON-LD structured data.

That means your code doesn’t have to be gigantic anymore, there’s now a choice to use both Microdata and JSON-LD.

Another use case is when using the Live Blogging structured data.

This change isn’t mandatory, you don’t have to change your current JSON-LD structured data. It’s totally optional.

Change Noticed Last Week

Google’s soft launch was noticed nearly immediately and amplified by Structured Data Consultant Jarno Van Driel (LinkedIn profile) who posted about it on LinkedIn.

Jarno started a discussion about this topic, posting on LinkedIn:

“It seems Google has released quite a fundamental update for both the Rich Result Test and Schema.org’s validator, an update which finally puts an end to a long standing personal desire:

Allowing entities described in multiple syntaxes (JSON-LD, Microdata, RDFa) to coalesce and/or be chained together!”

Jono Alderson (LinkedIn profile) shared this example:

“<main>
<article itemid=”https://example.com/articles/some-article#mainEntityOfPage” itemscope itemtype=”https://schema.org/Article”>
<h1 itemprop=”headline”>
The article’s headline goes here.
</h1>
<div itemprop=”articleBody”>
The article’s content goes here.
</div>
</article>
</main>

<script type=”application/ld+json”>
{
“@context”: “https://schema.org”,
“@graph”: [{
“@id”: “https://example.com/articles/some-article#mainEntityOfPage”,
“url”: “https://example.com/articles/some-article”,
“mainEntityOfPage”: {
“@id”: “https://example.com/articles/some-article”,
“@type”: “WebPage”,
“name”: “The <title> value goes here.”,
“description”: “The <meta> description goes here.”,
“url”: “https://example.com/articles/some-article”
}
}]
}
</script>”

Pay attention that “@id” attribute of JSON-LD graph:

“@id”: “https://example.com/articles/some-article#mainEntityOfPage”

matches itemid attribute of Microdata schema

itemid=”https://example.com/articles/some-article#mainEntityOfPage”

which merges these two types of definitions.

Impact For SEO

The impact to SEO will be that now publishers can enjoy the benefits of low-code Microdata  without having to commit to exclusively using Microdata.

That said, the most obvious impact is to publishers who reproduce the entire article in the articleBody property of the BlogPosting, Article and other similar Schema.org structured data types, although there may be other use cases where it makes sense, too.

Featured Image by Shutterstock/Asier Romero

Source link

Leave a comment
Stay up to date
Register now to get updates on promotions and coupons

Shopping cart

×