A Guide to JSON-LD for Beginners
@type for nesting: When you use a nested item type, you’re going to need to nest another @type (this is particularly important to understanding product and breadcrumb markups).
The next step is to annotate information about the item type. You can find item properties within the item type’s Schema.org page.
In terms of the syntax of JSON-LD, there are two important elements for each item property:
Posted by alexis-sanders
What is JSON-LD?
It is an implementation format for structuring data analogous to Microdata and RDFa. Typically, in terms of SEO, JSON-LD is implemented leveraging the Schema.org vocabulary, a joint effort by Google, Bing, Yahoo!, and Yandex in 2011 to create a unified structured data vocabulary for the web. (However, Bing and other search engines have not officially stated their support of JSON-LD implementations of Schema.org.)
JSON-LD is considered to be simpler to implement, due to the ability to simply paste the markup within the HTML document, versus having to wrap the markup around HTML elements (as one would do with Microdata).
What does JSON-LD do?
JSON-LD annotates elements on a page, structuring the data, which can then be used by search engines to disambiguate elements and establish facts surrounding entities, which is then associated with creating a more organized, better web overall.
Where in the HTML (for a webpage) does JSON-LD live?
Google recommends adding JSON-LD to the section of the HTML document; however, it’s okay if the JSON-LD is within the section. Google can also grasp dynamically generated tags in the DOM.
The immutable tags (Think: You don’t need to memorize these, just copy/paste)
|Pro Tip: Close every tag you open when you open it. Think: The salt goes with the pepper, and opening braces come with a closing brace.|
Note: If your JSON-LD isn’t in the curly braces, it isn’t being parsed (i.e., curl it up).
The second element that retains a permanent place in JSON-LD markup is the @context with the value of https://schema.org. The @context says, “Hey browser, this is the vocabulary I’m referencing. You can find it at https://schema.org.” The benefit for an SEO is that we get to use any of the item types and item properties that Schema.org defines.
Additionally, you’re probably noticing that cute, eyelash-like comma at the end of the statement. Commas mean “There’s more. Don’t stop parsing the data.”
|Pro Tip: Mind your commas (and always check in Google’s Structured Data Testing Tool). Commas are a traditional sore-spot for many programmers and JSON-LD offers no solace here. Missed commas mean invalid markup.|
The final element in the JSON-LD Schema copy/paste squad is the @type specification (after the colon, it becomes all data annotation). @type specifies the item type being marked up. You can …read more
Source:: Moz Blog