- From: Alexandre Passant <alex@seevl.net>
- Date: Tue, 23 Aug 2011 12:15:16 +0000
- To: Manu Sporny <msporny@digitalbazaar.com>
- Cc: Linked JSON <public-linked-json@w3.org>
On Tue, Aug 23, 2011 at 4:29 AM, Manu Sporny <msporny@digitalbazaar.com> wrote: > On 08/19/2011 09:00 AM, Markus Lanthaler wrote: >> >> Gregg Kellogg wrote: >>> >>> Also, we discussed format=context to describe the format of an @context >>> document. >> >> Yes, we should add that as well. I think it would also be interesting to >> link from a context document to a data document as Glenn proposed: > > Who, on this mailing list, currently needs this feature for an application > that they're building? I'm not saying that we shouldn't do it - I'm just > wondering who can't accomplish what they want to accomplish without this > feature. > > That is, why wouldn't fetching the JSON you want to interpret as JSON-LD and > injecting a pre-known context into the returned object work? > >>> On 07/06/2011 11:46 AM, glenn mcdonald wrote: >>>> >>>> If it's a goal to be able to impose context on an "existing" JSON >>>> feed, it might be even more effective, instead of allowing @context >>>> to point to an external file, to invert this and have a context file >>>> that can point to a data file. That way the data file itself can be >>>> completely untouched. >>> >>> Would something like this work for you, Glenn? >>> >>> { >>> "@context": "http://example.org/microblog", >>> "@data": "http://foo.bar/posts/15" >>> } >> >> We could define an optional "data" or "instance" MIME type parameter for >> JSON-LD context documents. TO link from an data/instance document to a >> JSON-LD context document we could use a link header (RFC5988), e.g.: >> >> Link:<http://www.example.com/context.jsonld>; rel="describedby"; >> type="application/ld+json"; > > This is an interesting direction. I like it because we don't have to > introduce another keyword to JSON-LD. The down-side is that JSON REST APIs > would have to be modified to include the Link header. That may not be > difficult in some cases, but may be impossible in other cases. We should > discuss it on the call. > +1 for this design choice. This is also what JSON-Schema proposes to link instance data and schema data (i.e. data and context in our case) http://tools.ietf.org/html/draft-zyp-json-schema-03#section-4 I don't think that's a big deal to add this Link in the header. We can probably assume that if a service is able to add a context in the JSON file (a step that would be often required to make the JSON => JSON-LD transition), it can also add the link in the header. It also saves bandwidth when the context becomes bigger and developers just need the JSON (or only fetching the context once in a while), and may be another good step for adoption. Alex. > -- manu > > -- > Manu Sporny (skype: msporny, twitter: manusporny) > Founder/CEO - Digital Bazaar, Inc. > blog: Uber Comparison of RDFa, Microformats and Microdata > http://manu.sporny.org/2011/uber-comparison-rdfa-md-uf/ > > -- Dr. Alexandre Passant - @terraces Founder, CEO - seevl.net - @seevl Reinventing Music Discovery
Received on Tuesday, 23 August 2011 12:15:46 UTC