JSON-LD

JSON for Linking Data


Data is messy and disconnected. JSON-LD organizes and connects it, creating a better Web.

 Linked Data

Linked Data empowers people that publish and use information on the Web. It is a way to create a network of standards-based, machine-readable data across Web sites. 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.

JSON-LD

JSON-LD is a lightweight Linked Data format. It is easy for humans to read and write. It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale. JSON-LD is an ideal data format for programming environments, REST Web services, and unstructured databases such as CouchDB and MongoDB.

Structured data markup is most easily represented in JSON-LD format, which stands for JavaScript Object Notation for Linked Data. The following is a simple JSON-LD structured data example you might use for contact information for your company:

<script type="application/ld+json">
{
  "@context""http://schema.org",
  "@type""Organization",
  "url""http://www.your-company-site.com",
  "contactPoint": [{
    "@type""ContactPoint",
    "telephone""+1-401-555-1212",
    "contactType""customer service"
  }]
}
</script>

Schema Markup example using JSON-LD:

(1)Organization Schema   Markup   :

Example (using JSON-LD)
<script type="application/ld+json">
{ "@context" : "http://schema.org",
  "@type" : "Organization",
  "legalName" : "Elite SEM",
  "url" : "http://elitesem.com/",
  "contactPoint" : [{
    "@type" : "ContactPoint",
    "telephone" : "+1-646-350-2789",
    "contactType" : "customer service"
  }]
  "logo" : "http://elitesem.com/wp-content/uploads/2014/03/Elite_SEM_Logo_2014.png",
  "sameAs" : [ "http://www.facebook.com/EliteSEM",
    "http://www.twitter.com/elitesem",
    "http://plus.google.com/+Elitesem",
    "https://www.youtube.com/user/EliteSEMInc",
    "http://www.linkedin.com/company/elite-sem",
    "https://www.wikidata.org/wiki/Q20736641"]
}
</script>

(2) WebSite   Schema   Markup :

Example (using JSON-LD)
<script type="application/ld+json">
{
  "@context" : "http://schema.org",
  "@type" : "WebSite",
  "name" : "Elite SEM",
  "url" : "http://elitesem.com/",
  "potentialAction" : {
    "@type" : "SearchAction",
    "target" : "http://elitesem.com/?s={search_term}",
    "query-input" : "required name=search_term"
  }                    
}
</script>

 


Another example  :

<script type='application/ld+json'>{"@context":"http:\/\/schema.org","@type":"WebSite","url":"http:\/\/www.vdigitalmarketing.com\/","name":"Digital Marketing Company &amp; Institute | Vdigital Marketing","potentialAction":{"@type":"SearchAction","target":"http:\/\/www.vdigitalmarketing.com\/?s={search_term_string}","query-input":"required name=search_term_string"}}</script>

(3)Site Navigation Schema Markup :

 

Example (using microdata)
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement">
  <li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/our-advantage">Our Advantage</a></li>
  <li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/our-travel-experts">Travel Experts</a></li>
  <li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/destinations">Destinations</a></li>
  <li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/cruises">Cruises</a></li>
  <li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/interests">Interests</a></li>
  <li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/explore-your-world/interests/hotels-and-resorts">Hotels</a></li>
  <li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/travel-guides">Travel Resources</a></li>
</ul>


(4) Schema Product & Offer Markup

Required Properties:
  • For the Product schema, only the “name” property is required.
  • For the Offer schema, the “price” and “priceCurrency” properties are required.
Example (using microdata)
<div itemscope itemtype="http://schema.org/Product">
  <h1 itemprop="name">Back to the Future 1:1 Scale Hoverboard</h1>
  <span itemprop="description">Time traveling to 2015 and back is only the beginning of the adventures found in Back to the Future Part II. The coolest part…was finding the hoverboard! And now the future is finally here and you can have a hoverboard of your own! This replica prop is an exact recreation from the one seen in Back to the Future II. Sure, it doesn't truly hover (come on scientists!) but carrying it around will let everyone know that you've just come back... from the future! Just don't try to use it on water! <i>Back to the Future is a trademark and copyright of Universal Studios and U-Drive Joint Venture. Licensed by Universal Studios Licensing LLC. All Rights Reserved.</i></span>
  <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    <meta itemprop="priceCurrency" content="USD" />
    Buy New: $<span itemprop="price">48.99</span>
    <link itemprop="availability" href="http://schema.org/InStock" />
  </span> 
</div>


(5)Schema Article Markup:

Required Properties:
  • Headline.
  • Image
  • DatePublished.
·         Example (using JSON-LD)
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Emmys 2015: The 5 categories we're most excited to see",
  "image": "http://rack.1.mshcdn.com/media/ZgkyMDE1LzA5LzIwLzQ0L2YyOGFiZmM5NmNkLmQ5Z
jgxLmpwZwpwCXRodW1iCTEyMDB4NjI3IwplCWpwZw/418b1a9e/940/f28abfc9-6cd9-217b-8bc7-fd48dd3621a9_MM714-21.jpg",
"keywords": ["television","emmys","uncategorized","entertainment","tv","emmys-2015"],
  "datePublished": "2015-09-20T13:39:38Z",
  "articleSection": "entertainment",
  "creator": "Sandra Gonzalez",
  "author": "Sandra Gonzalez",
  "articleBody": "The 2015 Emmy Awards are upon us, and while television's biggest night has in several years etc....",
  "mainEntityOfPage": "True"
}
</script>

(6) Event Schema Markup

Example (using JSON-LD)
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "MusicEvent",
  "name": "AC/DC",
  "image": "http://s1.ticketm.net/tm/en-us/dbimages/199365a.jpg",
  "startDate": "2015-09-25T19:45:00-07:00",
  "url": "http://www.ticketmaster.com/acdc-san-francisco-california-09-25-2015/event/1C004E43C5D25EDC?artistid=1170951&majorcatid=10001&minorcatid=200",
  "location" : {
    "@type": "Place",
    "name": "AT&T Park",
    "sameAs": "http://www.ticketmaster.com/AT-T-Park-tickets-San-Francisco/venue/229585",
    "address" : {
      "@type": "PostalAddress",
      "streetAddress": "24 Willie Mays Plaza",
      "addressLocality":"San Francisco",
      "addressRegion":"CA",
      "postalCode":"94107",
      "addressCountry":"US"
      }
   },
  "offers" : {
    "@type" : "Offer",
    "url":"http://www.ticketmaster.com/acdc-san-francisco-california-09-25-2015/event/1C004E43C5D25EDC?artistid=1170951&majorcatid=10001&minorcatid=200"
  }
}
</script>

 Learn  More about  JSON-LD  FROM https://json-ld.org/



0 comments:

Post a Comment