JavaScript Objective
Notation for Linked Data (popularly known as JSON-LD) is a structured data
format that is supported by Google and other big search engines to markup your
website.
While it is one of the formats for structured data (Microdata and RDFa being the other ones), it has many advantages over either of the other formats
- It is placed in a script tag rather than the body of the web page.
- Since JSON-LD code is not required to be placed inline, therefore, there is no need to change HTML elements.
- JSON-LD method does not affect the rendering of the webpage as the information inside the script is hidden from the visitor.
- This information can only be used by search engines.
- Above all, this method is easier to implement and also recommended by Google.
Hence, JSON-LD is the preferred method of implementing structured data markup.
The example of
JSON-LD code generated by the schema builder plugin is as follows:
- <script type="application/ld+json">
- {
- "@context": "https://schema.org/",
- "@type": "Product",
- "name": "Apple Watch Series (GPS, mm) - Space Gray Aluminum Case with Black Sport Band",
- "image": "",
- "offers": {
- "@type": "Offer",
- "priceCurrency": "",
- "price": "",
- "availability": "",
- "url": "",
- "priceValidUntil": ""
- },
- "aggregateRating": {
- "@type": "AggregateRating",
- "ratingValue": "",
- "ratingCount": "",
- "reviewCount": "",
- "bestRating": "",
- "worstRating": ""
- },
- "review": "",
- "description": "",
- "brand": "Apple",
- "sku": "",
- "mpn": "",
- "gtin8": "",
- "gtin13": "",
- "gtin14": "",
- "gtin": "",
- "gtin12": "",
- "nsn": "",
- "award": "",
- "category": "",
- "material": "",
- "awards": "",
- "color": "",
- "productID": "",
- "slogan": "",
- "model": ""
- }