- From: Thomas Hoppe <thomas.hoppe@n-fuse.de>
- Date: Fri, 27 Sep 2013 22:02:20 +0200
- To: public-linked-json@w3.org
Hi Markus, The main purpose of this exercise is to link the schema to the document - yes. We use the Link header today in out solution to announce the corresponding JSON schema, with this I just wanted to propose a way link them in-band. In this solution it is intended that the client dereferences the type and then will get a JSON schema and if he understands JSON schema, he can do what a schema is useful for: introspect. I know that this is a little bit naive an you don't like it but then allow me the following question: What is the actual value of having a type which is not intended to be dereferenced and I'm especially thinking about the schema.org "things"? Is this the point where I'm supposed to hardcode strings like http://schema.org/Place and match it? Wouldn't it be more sensible to dereference also the type to learn more about about its anatonomy? One more thing: Is a trailing '#' an indicator that a IRI is not dereferencable? greets, Thomas On 09/27/2013 06:08 PM, Markus Lanthaler wrote: > Hi Thomas > > On Thursday, September 26, 2013 4:51 PM, Thomas Hoppe wrote: >> Say I have a JSON schma backed address resource like this: >> >> { >> "id": "123", >> "street": "Street", >> "postcode": "000", >> "city": "Somecity", >> "country": "DE", >> "latitude": 0, >> "longitude": 0 >> } >> >> And that it's schema is https://meta.example.de/schemas/address >> >> I would suggest to enrich it with the following >> to make it a JSON-LD document with a reference to a JSON schema: >> >> { >> "@context": { >> "@vocab": "https://meta.example.de/schemas/" <-- Prefix IRI for > rest of the node >> }, >> "@id": "123", >> "@type": "address", <-- Node-type > [...] >> I make use the schema's URI as an IRI of the node type. >> This should be valid as to my best knowledge, JSON-LD does not >> mandate what to be expect if node type is dereferenced (correct me if >> I'm wrong). What do you thin about this approach? > Yes, this is syntactically correct. The question however is why you would do > something like that? The URLs don't dereference (you would need a # at the > end instead of a /) and even if they would, what would a client be supposed > to do with the retrieved schema? Are you just trying to link the document to > the schema? Have you considered to use an HTTP Link header instead? > > > -- > Markus Lanthaler > @markuslanthaler > >
Received on Friday, 27 September 2013 20:02:49 UTC