Skip to content

Instantly share code, notes, and snippets.

@eterps
Last active March 21, 2017 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eterps/0d52bd722ce3209587a97f9724feacff to your computer and use it in GitHub Desktop.
Save eterps/0d52bd722ce3209587a97f9724feacff to your computer and use it in GitHub Desktop.
json-ld example
{
"@context": "https://schema.org",
"@type": "Person",
"familyName": "Simpson"
}
{
"@context": "https://schema.org",
"@type": "Movie",
"name": "Jason Bourne",
"url": "https://jasonbourne.com",
"actor": {
"@type": "Person",
"name": "Matt Damon",
"sameAs": "http://www.imdb.com/name/nm0000354/"
},
"director": {
"@type": "Person",
"name": "Paul Greengrass",
"sameAs": "http://www.imdb.com/name/nm0339030/"
},
"image": {
"@type": "ImageObject",
"url": "https://t3.gstatic.com/images?q=tbn:ANd9GcQ27a64TqUZLOU1QbJiBPhu4mBZMW50wFzR62ob5W9o9Mgx7blK"
}
}

https://moz.com/blog/json-ld-for-beginners

"@context": "https://schema.org"

Hey browser, this is the vocabulary that I'm referencing. You can find it at https://schema.org

Benefit for SEO: We get to use any of the item types and item properties that schema.org defines.

"@type": "Person"

Hey I am using the Person item type (You can find it at https://schema.org/Person)

"familyName": "Simpson"

"familyName" is the item property and "Simpson" is its value.

"familyName": ["Derulo", "Desrouleaux"]

"sameAs": ["https://twitter.com/jasonderulo", "https://facebook.com/jderulo"]

An item property can also have multiple values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment