Skip to content

Instantly share code, notes, and snippets.

@wagjo
Last active August 29, 2015 14:02
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 wagjo/d6419a289a64c503010c to your computer and use it in GitHub Desktop.
Save wagjo/d6419a289a64c503010c to your computer and use it in GitHub Desktop.
Linked data in EDN
JSON-LD
{
"@context": {
"name": "http://xmlns.com/foaf/0.1/name",
"homepage": {
"@id": "http://xmlns.com/foaf/0.1/homepage",
"@type": "@id"
}
},
"name": "Manu Sporny",
"homepage": "http://manu.sporny.org/"
}
EDN
#ld/graph
{:context {name "http://xmlns.com/foaf/0.1/name",
homepage {:id "http://xmlns.com/foaf/0.1/homepage",
:type :id},
name "Manu Sporny",
homepage "http://manu.sporny.org/"}
----------
JSON-LD
{
"@context": {
"ical": "http://www.w3.org/2002/12/cal/ical#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"ical:dtstart": {
"@type": "xsd:dateTime"
}
},
"ical:summary": "Lady Gaga Concert",
"ical:location": "New Orleans Arena, New Orleans, Louisiana, USA",
"ical:dtstart": "2011-04-09T20:00Z"
}
EDN
#ld/graph
{:context {ical "http://www.w3.org/2002/12/cal/ical#"
xsd "http://www.w3.org/2001/XMLSchema#"
ical/dtstart {:type inst}}
ical/summary "Lady Gaga Concert",
ical/location "New Orleans Arena, New Orleans, Louisiana, USA",
ical/dtstart "2011-04-09T20:00Z"}
-----------------
JSON-LD
{
"@context": {
"gr": "http://purl.org/goodrelations/v1#",
"pto": "http://www.productontology.org/id/",
"foaf": "http://xmlns.com/foaf/0.1/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"foaf:page": {
"@type": "@id"
},
"gr:acceptedPaymentMethods": {
"@type": "@id"
},
"gr:hasBusinessFunction": {
"@type": "@id"
},
"gr:hasCurrencyValue": {
"@type": "xsd:float"
}
},
"@id": "http://example.org/cars/for-sale#tesla",
"@type": "gr:Offering",
"gr:name": "Used Tesla Roadster",
"gr:description": "Need to sell fast and furiously",
"gr:hasBusinessFunction": "gr:Sell",
"gr:acceptedPaymentMethods": "gr:Cash",
"gr:hasPriceSpecification": {
"gr:hasCurrencyValue": "85000",
"gr:hasCurrency": "USD"
},
"gr:includes": {
"@type": [
"gr:Individual",
"pto:Vehicle"
],
"gr:name": "Tesla Roadster",
"foaf:page": "http://www.teslamotors.com/roadster"
}
}
EDN
#ld/graph
{:context {gr "http://purl.org/goodrelations/v1#",
pto "http://www.productontology.org/id/",
foaf "http://xmlns.com/foaf/0.1/",
xsd "http://www.w3.org/2001/XMLSchema#",
foaf/page {:type :id},
gr/hasBusinessFunction {:type :id},
gr/hasCurrencyValue {:type float}
:id "http://example.org/cars/for-sale#tesla",
:type gr/Offering,
gr/name "Used Tesla Roadster",
"http://purl.org/goodrelations/v1#description" "Need to sell fast and furiously",
gr/hasBusinessFunction gr/Sell,
"http://purl.org/goodrelations/v1#acceptedPaymentMethods" {:value gr/Cash :type :id},
gr/hasPriceSpecification {gr/hasCurrencyValue "85000",
gr/hasCurrency "USD"},
gr/includes {:type [gr/Individual pto/Vehicle],
gr/name "Tesla Roadster",
foaf/page "http://www.teslamotors.com/roadster"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment