JSON-LD stands for JavaScript Object Notation for Linked Data. It is based on very popular JSON Format, which makes it easy to use and understand by humans.
- JSON is a format for data-interchange. It is user friendly which makes it easy to read and write by humans, and it is also easy for machines for parse and generate it.
- Linked Data is a way to create a network of standards-based, machine-readable data across different Websites. It allows an application to start at one piece of Linked Data, and follow embedded links to other pieces of Linked Data that are hosted on different sites across the Web.
Sometimes a Website can have both AMP and non-AMP version of same page, but the problem is how to tell search engines and users that a different version of this page exist. This problem can be solved by –
- Giving a hyperlink to different version of page.
- Or add information about other version of same page in head of html page by using link tag.
But sometimes it is required to add more information about page, and to add these additional information JSON-LD is used. It is also recommended by Google.
Example-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Blog", "mainEntityOfPage": "http://ampexample.com/index.html", "headline": "Json-ld/amp", "datePublished": "2016-12-17T12:00:00Z", "dateModified": "2016-12-17T12:00:00Z", "description": "Description for ampexample.com", "author": { "@type": "User", "name": "ABC XYZ" }, "publisher": { "@type": "Organization", "name": "Google", "logo": { "@type": "ImageObject", "url": "http://ampexample.com/logo.jpg", "width": 600, "height": 60 } }, "image": { "@type": "ImageObject", "url": "http://ampexample.com/leader.jpg", "height": 2000, "width": 800 } } </script> |