Microdata or JSON-LD? I'm confused
Asked Answered
P

5

67

I haven't found a clear and updated answer, even after googling for a few hours, so here it goes:

  1. I am aware of the advantages and disadvantages of both Microdata and JSON-LD. I also know that Microdata was dropped from W3C (and consequently from the browsers' API). What I'm not sure about is that how it will affect any site where Microdata is used specifically for SEO purpose.

  2. Does Google support JSON-LD for SERPs? What format does it recommend to use? I am looking for updated answers - not from 2011 or 2012 (if they are still applicable though, feel free to post it).

  3. What is more appropriate for a dynamic site with lots of contents (think: 50000 videos, images etc): JSON-LD, Microdata or RDFa? Why?

Percept answered 29/6, 2016 at 6:12 Comment(0)
R
86

Consumers that support Microdata support Microdata, no matter if or where Microdata is specified.

It’s conceivable that new consumers might decide not to support it, but the syntax is still very popular and still part of WHATWG’s HTML Living Standard, so it’s probably not going to vanish.

About the consumer Google

Some years ago, JSON-LD was not supported for many of their features, and they recommended that authors use Microdata (and they supported RDFa, too). Today it’s different.

See Google’s Markup formats and placement:

JSON-LD is the recommended format. Google is in the process of adding JSON-LD support for all markup-powered features. The table below lists the exceptions to this. We recommend using JSON-LD where possible.

According to the mentioned table, Microdata and RDFa support all of Google’s data types, while JSON-LD supports everything except their Breadcrumbs feature.

I wouldn’t give much weight to their recommendation. They say that "Structured data markup is most easily represented in JSON-LD format", but I think it’s safe to say that this only applies to authors that generate the structured data programmatically (especially from tools that support JSON).
For authors that manually add the structured data markup, it’s typically easier to use Microdata or RDFa, and using these syntaxes minimizes the risk that an author updates the content without updating the structured data, too (see DRY principle).

JSON-LD vs. Microdata vs. RDFa

Unless you know (and care for) consumers that don’t support all three syntaxes, it doesn’t matter. Use what is easier for you and your tools.

If you have no preference, I would say JSON-LD or RDFa, because contrary to Microdata,

  • both are W3C Recommendations,
  • both can be used in non-HTML5 contexts,
  • both allow to (easily) mix several vocabularies.

JSON-LD if you like your structured data not "intermingled" with your markup (= duplicating the content), RDFa if you like to use your existing markup (= not duplicating the content).

Rosalinarosalind answered 29/6, 2016 at 12:58 Comment(3)
Thank you for a very concise answer. microdata is very useful for me, because I am already separating markup using twig, so I can just add the twig variables in the markup and be done with it.Percept
@Rosalinarosalind - I've cited this and three other of your answers in a new question and would be interested in your answer if see this: #52376145Dribble
Also @Rosalinarosalind - Does the recommendation in this answer still stand as is, or would you change anything about it after two years?Dribble
B
7

I've opted to go for JSON-LD because it is easier to read and compile. Spotting errors is easy for more complicated dictionaries. It is the W3C and Google recommended standard.

One caveat (major if you need to support it), is that as of May 16 2017, Bing STILL doesn't support JSON-LD

Bluefield answered 16/5, 2017 at 13:45 Comment(2)
Bing now supports JSON-LD plus.google.com/106943062990152739506/posts/fEV3TyBhAr4Transmute
Working link about JSON-LD Bing blogs.bing.com/webmaster/august-2018/…Homorganic
B
2

Google's Understand how structured data works now says:

Google recommends using JSON-LD for structured data whenever possible.

It seems reasonable to me to still mix in microdata to avoid duplication of long content, such as articleBody, but generally the industry is JSON-LD all the way.

Bee answered 16/5, 2019 at 9:29 Comment(1)
I'm asking myself how you'd mark every review on a page as an itemprop="review". And every review body therein as an itemprop="reviewBody". Does JSON-LD allow for referring to various elements on the page?Malvinamalvino
C
2

I discovered that JSON-LD does support breadcrumbs. I applied breadcrumbs using the latest version of Yoast on my wordpress site, and it passed muster with google search console in the rich results test of the live page as well as a crawl of the live page after submitting the sitemap.

It should be noted that Google had deprecated the use of data-vocabulary.org. It wants schema.org.

Chloris answered 21/7, 2020 at 6:37 Comment(0)
M
0

microdata easy to use with angular 8+ but you can do the same thing with json-ld.

Humanly, you can read attributs easiest with json-ld but there is no big difference between both. Just use what you know how to do to win time

Motor answered 8/7, 2020 at 11:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.