Skip to content

Instantly share code, notes, and snippets.

@HadrienGardeur
Last active October 5, 2018 07:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save HadrienGardeur/03ab96f5770b0512233a to your computer and use it in GitHub Desktop.
Save HadrienGardeur/03ab96f5770b0512233a to your computer and use it in GitHub Desktop.
JSON-LD for application/webpub+json
{
"@context": "http://readium.org/webpub/default.jsonld",
"metadata": {
"@type": "http://schema.org/Book",
"identifier": "urn:isbn:9780000000001",
"title": "Moby-Dick",
"author": "Herman Melville",
"language": "en",
"publisher": "Whale Publishing Ltd.",
"modified": "2016-02-18T10:32:18Z",
"description": "Moby-Dick recounts the adventures of the narrator Ishmael as he sails on the whaling ship Pequod under the command of Captain Ahab."
},
"links": [
{"rel": "self", "href": "http://example.org/bff.json", "type": "application/webpub+json"},
{"rel": "alternate", "href": "http://example.org/publication.epub", "type": "application/epub+zip"}
],
"spine": [
{"href": "http://example.org/cover.svg", "type": "image/svg+xml", "rel": "cover-image", "title": "Cover"},
{"href": "http://example.org/chapter1.html", "type": "text/html", "title": "Chapter 1"},
{"href": "http://example.org/chapter2.html", "type": "text/html", "title": "Chapter 2"}
],
"resources": [{"href": "http://example.org/style.css", "type": "text/css"}]
}
{
"@context": "http://readium.org/webpub/default.jsonld",
"metadata": {
"@type": "http://schema.org/Book",
"identifier": "urn:isbn:9780000000002",
"title": {
"en": "A Journey into the Center of the Earth",
"fr": "Voyage au centre de la Terre"
},
"sort_as": "Journey into the Center of the Earth, A",
"author": {
"name": "Jules Verne",
"identifier": "http://isni.org/isni/0000000121400562",
"sort_as": "Verne, Jules"
},
"translator": "Frederick Amadeus Malleson",
"language": ["en", "fr"],
"publisher": "SciFi Publishing Inc.",
"modified": "2016-02-22T11:31:38Z",
"description": "The story involves German professor Otto Lidenbrock who believes there are volcanic tubes going toward the centre of the Earth. He, his nephew Axel, and their guide Hans descend into the Icelandic volcano Snæfellsjökull, encountering many adventures, including prehistoric animals and natural hazards, before eventually coming to the surface again in southern Italy, at the Stromboli volcano.",
"http://schema.org/isFamilyFriendly": true,
"belongs_to": {
"series": {
"name": "The Extraordinary Voyages",
"position": 3
},
"collection": "SciFi Classics"
}
},
"links": [
{"rel": "self", "href": "http://example.org/bff.json", "type": "application/webpub+json"},
{"rel": "alternate", "href": "http://example.org/publication.epub", "type": "application/epub+zip"}
],
"spine": [
{"href": "http://example.org/cover.svg", "type": "image/svg+xml", "rel": "cover", "title": "Cover"},
{"href": "http://example.org/chapter1.html", "type": "text/html", "title": "Chapter 1"},
{"href": "http://example.org/chapter2.html", "type": "text/html", "title": "Chapter 2"}
],
"resources": [{"href": "http://example.org/style.css", "type": "text/css"}]
}
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
<urn:isbn:9780000000001>
a schema:Book ;
schema:author "Herman Melville"^^xsd:string ;
schema:dateModified "2016-02-18T10:32:18Z"^^xsd:dateTime ;
schema:description "Moby-Dick recounts the adventures of the narrator Ishmael as he sails on the whaling ship Pequod under the command of Captain Ahab."^^xsd:string ;
schema:inLanguage "en"^^xsd:string ;
schema:name "Moby-Dick"^^xsd:string ;
schema:publisher "Whale Publishing Ltd."^^xsd:string .
[]
schema:hasPart [
schema:fileFormat "image/svg+xml"^^xsd:string ;
schema:name "Cover"^^xsd:string ;
schema:url "http://example.org/cover.svg"^^xsd:string
], [
schema:fileFormat "text/html"^^xsd:string ;
schema:name "Chapter 1"^^xsd:string ;
schema:url "http://example.org/chapter1.html"^^xsd:string
], [
schema:fileFormat "text/html"^^xsd:string ;
schema:name "Chapter 2"^^xsd:string ;
schema:url "http://example.org/chapter2.html"^^xsd:string
] ;
owl:sameAs <urn:isbn:9780000000001> .
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bib: <http://bib.schema.org/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
<urn:isbn:9780000000002>
a schema:Book ;
schema:alternateName "Journey into the Center of the Earth, A"^^xsd:string ;
schema:author <http://isni.org/isni/0000000121400562> ;
schema:dateModified "2016-02-22T11:31:38Z"^^xsd:dateTime ;
schema:description "The story involves German professor Otto Lidenbrock who believes there are volcanic tubes going toward the centre of the Earth. He, his nephew Axel, and their guide Hans descend into the Icelandic volcano Snæfellsjökull, encountering many adventures, including prehistoric animals and natural hazards, before eventually coming to the surface again in southern Italy, at the Stromboli volcano."^^xsd:string ;
schema:inLanguage "en"^^xsd:string, "fr"^^xsd:string ;
schema:isFamilyFriendly true ;
schema:isPartOf [
bib:Collection "SciFi Classics"^^xsd:string ;
schema:Series [
schema:name "The Extraordinary Voyages"^^xsd:string ;
schema:position 3
]
] ;
schema:name "A Journey into the Center of the Earth"@en, "Voyage au centre de la Terre"@fr ;
schema:publisher "SciFi Publishing Inc."^^xsd:string ;
schema:translator "Frederick Amadeus Malleson"^^xsd:string .
<http://isni.org/isni/0000000121400562>
schema:alternateName "Verne, Jules"^^xsd:string ;
schema:name "Jules Verne"^^xsd:string .
[]
schema:hasPart [
schema:fileFormat "image/svg+xml"^^xsd:string ;
schema:name "Cover"^^xsd:string ;
schema:url "http://example.org/cover.svg"^^xsd:string
], [
schema:fileFormat "text/html"^^xsd:string ;
schema:name "Chapter 1"^^xsd:string ;
schema:url "http://example.org/chapter1.html"^^xsd:string
], [
schema:fileFormat "text/html"^^xsd:string ;
schema:name "Chapter 2"^^xsd:string ;
schema:url "http://example.org/chapter2.html"^^xsd:string
] ;
owl:sameAs <urn:isbn:9780000000002> .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment