I need to look at any document that has an embedded JSON-LD object in the HTML.
I have embedded a JSON-LD object on my architecture. I have context from 2 sources schema.org and my custom set of vocab with is further negotiated with the scheam.org reference which is www.mysitename/vocab.
Here I have provided a download link with .jsonld file extension. I need to see a reference from any HTML document that has embedded a JSON-LD object in it to get an idea about it.
Below is the embedded JSON-LD object in the source-code of my HTML document:
<script type="application/ld+json">
{
"@context": [
"http://schema.org/",
"http://puneet.ys/vocab"
],
"@id": "http://puneet.ys/seahawks",
"@type": "SportsTeam",
"name": "Seattle Seahawks",
"url": "http://puneet.ys/seahawks",
"image": "/2011/12/08/35/team/222398/large.jpg",
"interactionCount": "124 UserLikes",
"logo": "/2011/12/08/35/team/222398/large.jpg",
"description": "The Seattle Seahawks are […]",
"discipline": "http://puneet.ys/sport/football",
"subOrganizationOf": "http://puneet.ys/company/nfl",
"location": {
"@id": "http://puneet.ys/seattle-wa",
"@type": "Place",
"name": "Seattle, WA",
"url": "http://puneet.ys/seattle-wa",
"image": "/2011/12/08/35/city/28545/large.jpg",
"interactionCount": "25 UserLikes",
"photo": "/2011/12/08/35/city/28545/large.jpg",
"sameAs": [
"http://www.freebase.com/m/0d9jr",
"http://en.wikipedia.org/wiki/Seattle",
"http://www.seattle.gov/"
]
},
"claimedBy": "http://puneet.ys/fan/chris-mccoy",
"sameAs": [
"http://www.freebase.com/m/070xg",
"http://www.facebook.com/Seahawks",
"http://www.twitter.com/seahawks",
"http://en.wikipedia.org/wiki/Seattle_Seahawks",
"http://www.seahawks.com"
]
} </script>
Google recommends adding JSON-LD to the <head> section of the HTML document; however, it's okay if the JSON-LD is within the <body> section. Google can also grasp dynamically generated tags in the DOM.
JSON-LD (JavaScript Object Notation for Linked Data) offers a simpler means to create machine-readable data from websites to promote search results. In simpler terms, it delivers more easily indexable content to search crawlers like Googlebot.
JSON-LD is a lightweight Linked Data format to easily read and write structured data on the web using open vocabularies like schema.org. Recommended by the World Wide Web Consortium, JSON-LD is the heir of the JSON format and allows linked data to operate in a Web-scale environment.
In this Google Webmaster Tools Answer it says:
The data, enclosed within the
<script type="application/ld+json"> ... </script>
tags as shown in the examples below may be placed in either the<HEAD>
or<BODY>
region of the page. Either way, it won’t affect how your document appears in users’ web browsers.
I wrapped your script
above in <html><header>
tags and it worked with the Google Email Markup-Tester, although for some reason the Google Webmaster Structured Data Testing Tool doesn't pick up JSON-LD yet.
You can also use Google's Structured Data Markup Helper, enter some dummy URL or HTML, click "Start Tagging" (blue button), add at least one tag, then "Create HTML" (red button) and finally change the "Microdata"-dropdown to "JSON-LD".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With