- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Mon, 12 Aug 2013 16:34:28 +0200
- To: "'Linked JSON'" <public-linked-json@w3.org>
On Monday, August 12, 2013 3:02 PM, Adrian Pohl wrote: > I have a short question about the possible values of the @type keyword > in a JSON-LD @context. Can I use any rdfs:Class as value in the > context? Example: > > { > "@context": > { > "creator": { > "@id": "http://purl.org/dc/terms/creator", > "@type": "http://xmlns.com/foaf/0.1/Person" > } > } > "@id": "http://example.org/SomeBook", > "creator": "http://example.org/somePerson" > } > > Is the above a valid JSON-LD expression of the following data expressed > as turtle? > > <http://example.org/SomeBook> <http://purl.org/dc/terms/creator> > <http://example.org/somePerson> . > <http://example.org/somePerson> a <http://xmlns.com/foaf/0.1/Person> . No, it is <http://example.org/SomeBook> <http://purl.org/dc/terms/creator> "http://example.org/somePerson"^^<http://xmlns.com/foaf/0.1/Person> > I don't see a problem doing this but as I haven't found an analogous > example anywhere I thought I'd better ask... If @type is used in the context it refers to the datatype. It is an overloaded keyword whose interpretation depends on where you use it. If use in the context or in a @value-object, it specifies the data data, if used in a node object it is a shorthand for rdf:type. The easiest way to get answers to questions like these is to use the playground: http://json-ld.org/playground/ -- Markus Lanthaler @markuslanthaler
Received on Monday, 12 August 2013 14:35:05 UTC