JSON-LD stands for JSON for Linking Data and is one of the Linked Data formats that the Record API supports. The basic structure of the JSON-LD response is similar to the default JSON format of the Record API:
{
"@context": {
"ore": "http://www.openarchives.org/ore/terms/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"dc": "http://purl.org/dc/elements/1.1/",
"edm": "http://www.europeana.eu/schemas/edm/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"dcterms": "http://purl.org/dc/terms/",
"foaf": "http://xmlns.com/foaf/0.1/",
"geo": "http://www.w3.org/2003/01/geo/wgs84_pos#"
},
"@graph": [
{
"@id": "http://data.europeana.eu/aggregation/europeana/09102/_CM_0839888",
"@type": "edm:EuropeanaAggregation",
"dc:creator": "Europeana",
"edm:aggregatedCHO": {
"@id": "http://data.europeana.eu/item/09102/_CM_0839888"
},
"edm:collectionName": "09102_Ag_EU_MIMO_ESE",
"edm:country": "Europe",
"edm:landingPage": {
"@id": "http://www.europeana.eu/portal/record/09102/_CM_0839888.html"
},
"edm:language": "mul",
"edm:rights": {
"@id": "http://creativecommons.org/licenses/by-nc-sa/3.0/"
}
},
{
"@id": "http://data.europeana.eu/aggregation/provider/09102/_CM_0839888",
"@type": "ore:Aggregation",
...
},
{
"@id": "http://data.europeana.eu/item/09102/_CM_0839888",
"@type": "edm:ProvidedCHO"
},
{
"@id": "http://data.europeana.eu/proxy/europeana/09102/_CM_0839888",
"@type": "ore:Proxy",
...
},
{
"@id": "http://data.europeana.eu/proxy/provider/09102/_CM_0839888",
"@type": "ore:Proxy",
...
},
{
"@id": "http://mediatheque.cite-musique.fr/masc/play.asp?ID=0839888",
"@type": "edm:WebResource"
},
{
"@id": "http://semium.org/time/1910",
"@type": "edm:TimeSpan",
...
},
{
"@id": "http://semium.org/time/19xx_1_third",
"@type": "edm:TimeSpan",
...
},
{
"@id": "http://sws.geonames.org/2950159",
"@type": "edm:Place",
...
},
{
"@id": "http://www.geonames.org/2950159",
"@type": "edm:Place",
...
},
{
"@id": "http://www.mimo-db.eu/InstrumentsKeywords/4495",
"@type": "skos:Concept",
...
},
{
"@id": "http://www.mimo-db.eu/media/MF-GET/IMAGE/MFIM000024482.jpg",
"@type": "edm:WebResource",
...
}
]
}
The big differences between normal JSON and JSON-LD are
JSON-LD makes use of Internationalized Resource Identifiers, IRIs as property names. This ensures that each statement of a record matches a standard vocabulary. In Europeana's implementation the properties are qualified names (in the format of "namespace_prefix:property_name" such as "dc:creator") for the sake of brevity. In the normal JSON response we use non-standard camel case ("dcCreator") property names. In the JSON Section you can find the connections between our camelCase property names and the JSON-LD and RDF qualified names.
JSON-LD has a @context
part, which links object properties in a JSON document to concepts in an ontology. In our JSON-LD this lists the used namespaces and their prefixes.
JSON-LD makes a distinction between values that are string literals from values that are other resources.
A resource as value:
{
"edm:landingPage": {
"@id": "http://www.europeana.eu/portal/record/09102/_CM_0839888.html"
},
...
}
A string literal as value:
{
"dc:creator": "Europeana",
...
}