Microdata, RDFa or JSON-LD Appropriate or best use?

I am wondering which of these formats is “best”? Schema.org, Microdata and RDFa are a little sick to implement. They can violate validation and require quite a lot of effort to enter documents.

JSON-LD is finally for me, a better way to implement structured data. But does it work? What is the level of support for it (at least Google)?

+55
json-ld microdata rdfa
Nov 13 '14 at 10:15
source share
5 answers

Schema.org is a dictionary that, like any other dictionary, can be used in many forms. The website http://schema.org/ has examples using Microdata strong> and the RDF and RDFa and JSON-LD syntaxes, but these are not the only syntaxes with which it can be used. For example, you can use it with any other RDF syntax like Turtle or RDF / XML .

There is no better syntax. All of them have advantages and disadvantages. See, for example, my answer on the differences between Microdata and RDFa . Note that you can use different syntaxes (and dictionaries) in the same document.

Now, if you have a specific customer, you should consult your documentation. However, syntax support comes and goes, and not everything that they can support is necessarily documented, and not everything that is documented necessarily works.

In the case of Google, you are probably interested in their rich snippets. Their rich fragment documentation mentions Microdata, Microformats, and RDFa. However, note that not all related examples use the Schema.org dictionary, but the older Data-vocabulary.org or Microformats (since you cannot use dictionaries such as Schema.org or Data-vocabulary.org with microformats). In addition, there are several Rich Snippets that are present on this page, such as the "Link Search Box" , for which they even recommend the JSON-LD syntax.

As a general tip: search engines usually prefer visible content over hidden metadata. For example, the presence of keywords in the form of hidden metadata allows authors to claim that their documents relate to something else that they actually are (either because of an attempt to deceive the search engine, or because the authors forget to update the content in both places) . Consequently, decoupling metadata from content, like its case with JSON-LD, can (possibly!) Lead to the same problems as current search engines with hidden metadata. (If or what search engines actually process it, this is a question that does not fit the topic.)

Another possible advantage to connecting metadata with content (for example, with RDFa) is that you can easily and automatically generate the same information in JSON-LD, Turtle, etc., because everything is just RDF. Just analyze RDFa, convert to your preference formats and paste (in a script ) or link (with rel - alternate ), if that makes sense.

But yes, adding RDFa is often more complicated than adding BLOB JSON-LD, because you need to adapt it to existing markup. (However, he should not “interrupt the check” unless you make mistakes.)

+43
Nov 13 '14 at 16:05
source share

The lines between Microdata , RDFa, and JSON-LD are indeed very blurry at present, and so far there is no universally accepted de facto among the three. It will have to wait now. Perhaps a couple or several years.

Meanwhile, Microdata should not be tagged with Schema.org, as you mentioned, because the two are different things. Schema.org is a dictionary, so it can be used for Microdata, RDFa, and JSON-LD.

Using Schema.org as a dictionary and using JSON-LD , since data representation is probably the most anticipated pair due to two general aspects:

  • Easy to read for people; and
  • Lightweight machine readable

but even so, there is still a disconnect between them, for example this example .

Regarding support for JSON-LD, since Bing, Google, Yahoo !, and Yandex confirm the use of schema.org, it is possible to say with confidence that they also support it, as in this example .

Update 2017

Google has been very active in promoting JSON -LD-schema.org over the last couple or three years.

+15
Apr 25 '15 at 19:03
source share

Google seems to be leaning towards using JSON-LD, but it hasn't implemented it for every use case!

Google is in the process of adding support for JSON-LD more function with markup. So far, JSON-LD is supported for all Knowledge Graphic functions, additional search fields, Event Rich Snippets, and Rich Snippets recipes; Google recommends using JSON-LD for these features. For the remaining types of Rich Snippets and breadcrumbs, Google recommends using microdata or RDFa.

http://developers.google.com/structured-data/schema-org

+8
Oct 06 '15 at 10:23
source share

Google uses JSON-LD as reference examples for structured SEO data for its knowledge schedule (companies and people). See https://developers.google.com/structured-data/customize/overview

I personally use a combination of JSON-LD and Microdata for my sites (for now).

I would say that they have other ways to determine whether the information you provide through JSON-LD matches their search engine (for example, checking your page actually says what it says).

+6
May 05 '15 at 14:49
source share

(updated answers!)

For "popularity", see this question / answers .

Microdata is the most popular today: in the universe of 34 million domains, 5.63 million (~ 17%) use “content markup” (I will use the markup shortcut) using RDFa (0.9 million), Microdata (2.5 million) or Microformats, and less than half use shared semantic descriptors, noting the most popular as JSON-LD, with 2.12 million (6%).
PS: we prefer "statistics for each domain" (instead of statistics for each page), because pages in the same domain as a whole have the same templates and other coercive agreements with local authorities.

In the universe of "areas expressing semantics" (7.75 million), the statistical profile is:

  • 73% markup semantic
  • 27% divided semantic
  • (... the intersection as “split + markup” in the mix may be zero to simplify ...)

rule of thumb in 2017

Use markup semantics with Microdata strong> and after it , if you need to express something more to machines, use JSON-LD .




Use markup semantics because it is the most popular, and because tagged content will be checked / checked at the same time by people and machines.

Important: remember that Microdata, RDFa (W3C standard) and JSON-LD (W3C standard) can be (easily) converted to RDF, so all of these formats are compatible.




PS: for HTML tables, see also W3C table metadata . For non-HTML public resources, use the W3C RDF-compliant tabular data model and / or frictionlessdata / specs as CSV files .

+3
May 14, '17 at 6:22
source share



All Articles