Suppose we have the following JSON:
{ "@context": { "name": "http://schema.org/name", "status": "http://schema.org/status" }, "name": "Manu Sporny", "status": "trollin'" }
( playground JSON-LD )
Say we have a URI for troll status: http://example.com/trolling .
Is it possible to map the trollin' keyword to a URI?
Something direct won't work:
{ "@context": { "name": "http://schema.org/name", "status": "http://schema.org/status", "trollin'": "http://example.com/trolling" }, "name": "Manu Sporny", "status": "trollin'" }
( JSON Playground )
The forced status to @id type @id also not work, since it is assumed that trollin' is a relative URI.
{ "@context": { "name": "http://schema.org/name", "status": { "@id": "http://schema.org/status", "@type": "@id" }, "trollin'": "http://example.com/trolling" }, "name": "Manu Sporny", "status": "trollin'" }
( playground JSON-LD )
source share