View apibunny-middleware
1 2 3 4 5 6 7 8 9 10
return function(request, next_middleware)
local response = next_middleware()
if (response.headers['content-type'] == 'application/json') then
local data = json.decode(response.body)
if (data.mazes) then
data['@context'] = 'http://www.hydra-cg.com/examples/maze'
data['id'] = data.mazes[1].id
data['@type'] = 'Maze'
View rdfa11.jsonld
1 2 3 4 5 6 7 8 9 10
{
"@context": {
"grddl": "http://www.w3.org/2003/g/data-view#",
"ma": "http://www.w3.org/ns/ma-ont#",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfa": "http://www.w3.org/ns/rdfa#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"rif": "http://www.w3.org/2007/rif#",
"rr": "http://www.w3.org/ns/r2rml#",
Something went wrong with that request. Please try again.