First Rich Snippets from JSON-LD Spotted in the Wild (And They're Delicious)…

Dr. IT SEO Services

Post image for First Rich Snippets from JSON-LD Spotted in the Wild (And They're Delicious)

Webmasters accustomed to marking up pages with structured data in order to generate rich snippets in Google have long looked forward to the day when Google sanctioned the use of JSON-LD for this purpose, rather than requiring them to use RDFa or microdata to provide these annotations inline.

JSON-LD is for most much easier to use than RDFa or microdata, is less likely to result in syntax errors when modified comaped to inline code, and can be inserted from JavaScript and still be understood by Google.

However, Google has long insisted on RDFa or microdata for most classes of rich snippets. Its structured data guidelines for developers state:

Google is in the process of adding JSON-LD support to more markup-powered features. So far, JSON-LD is supported for all Knowledge Graph features, sitelink search boxes, and Event Rich Snippets; 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.

Despite this the Google documentation for rich snippets has recently changed to include examples for all rich snippets types listed on the site: products, reviews, events, software apps, videos and articles (indeed, it’s now the first syntax shown in examples for each of these rich snippet types). And recipes:

Many webmasters have been encouraged to see these JSON-LD examples surface, but reticent to employ JSON-LD for Google rich snippet types until there’s been JSON-LD-generated rich snippets spotted in the wild.

That day has arrived, thanks to the efforts of structured data veteran and cook Grace Massa Langlois. I say “and cook” because it was on her recipe-rich site that she made code modifications to see if a recipe that included schema.org/Recipe markup in – and only in – JSON-LD could successfully trigger the generation of a rich snippet in Google.

And, yes, if you now search for “grace’s cannoli and cannoli filling recipe” on Google, you will see this result (which links to this recipe):

The rich snippet image, date and cook time are clearly being generated from the values declared for schema.org/Recipe properties in JSON-LD – in particular totalTime, as that “3 hr 3 min” in the snippet only materialized after she modified pre-existing JSON-LD code to include it.

<script type="application/ld+json">

  "@context": "
  "@type": "Recipe",
  "image" : "
  "name": "Cannoli Siciliani – The Ultimate Italian Pastry",
  "description" : "Prepare one of Italy's most famous pastries at home, cannoli siciliani. Crispy cannoli shells filled with creamy ricotta filling.",
  "totalTime" : "PT3H3M",
  "cookTime" : "PT45M",
  "prepTime" : "PT2H18M", 
  "recipeCategory" : "Pastries",
  "recipeYield" : "28 pastries",
  "ingredients" : [
     "167 g (1 1/3 cups) plain (all-purpose) flour",
     "1/4 teaspoon salt",
     "14 g (1 tablespoon) granulated sugar",
     "5 g (2 teaspoons) unsweetened cocoa powder (not Dutch processed)",
     "28 g (2 tablespoons) vegetable shortening",
     "6 to 7 tablespoons sweet Marsala wine",
     "Vegetable Oil for frying",
     "1 to 2 large egg whites, lightly beaten",
     "660 g (3 cups) fresh ricotta, drained overnight",
     "167 g to 188 g (1 1/3 to 1½ cups) confectioners’ sugar, sifted",
     "1½ teaspoons pure vanilla extract",
     "50 g (1/3 cup) finely diced candied citron or candied orange peel, or a combination (optional)",
     "65 g (1/3 cup) miniature semi-sweet chocolate chips"
] ,
  "datePublished" : "2010-06-07",
  "author" : 
  "@type": "Person",
  "name" : "Grace Massa Langlois",
  "sameAs" : [ 
    "
    "
    "
    "
    "
    "
    "
]
  
  
</script>

She has also verified JSON-LD-based rich snippet generation for another recipe, as detailed in the comments to this Google+ discussion started by Tony McCreath.

So there you have it: yes, JSON-LD can be used rather than RDFa or microdata to generate rich snippets in Google, at least for recipes rich snippets.

And while Google’s documentation has not yet changed, it may simply be a case of one structured data documentation page not keeping pace with changes to others. One way or another, webmasters will now be keeping a keen eye on other rich snippet types to see if JSON-LD for them, too, is a recipe for success.

Many thanks to Grace for conducting these tests and sharing the results with the semantic search community, and Tony for getting the conversation started.

UPDATE (publication + 1.5 hrs): Dan Brickley of Google said the following in relation to this post:

Our documentation may have got slightly ahead of our implementation efforts here … but glad to hear that JSON-LD is proving so popular. Reviews/products/software RS are still best expressed in microdata/rdfa for now.

So don’t put away your itemtypes and typeofs just yet boys and girls – but soon, hopefully, soon.

Source link

Dr. IT SEO Services - Webdesign, SEO and IT Services



http://reparacalculator.com/first-rich-snippets-from-json-ld-spotted-in-the-wild-and-theyre-delicious/
If You Enjoyed This, Take 5 Seconds To Share It