W3C home > Mailing lists > Public > public-linked-json@w3.org > April 2014

RE: Re-post: Request JSON-LD with embedded or referenced context

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Tue, 15 Apr 2014 20:35:33 +0200
To: "'John Walker'" <john.walker@semaku.com>, <public-linked-json@w3.org>
Message-ID: <011101cf58d9$7d59fa30$780dee90$@lanthaler@gmx.net>
Hi John,

I think you didn’t get a reply to your mail below yet. Right?

On Saturday, April 05, 2014 7:42 AM, John Walker wrote:
> Following on from a Twitter exchange with Manu, Markus and Gregg where
> I asked about best practices regarding embedding or referencing to a
> context in a JSON-LD document.
> I wondered if there is any way for a client to indicate a preference
> for embedded or referenced context when making a request?

No, currently there isn't.

> Having read the IANA Considerations chapter of the JSON-LD
> recommendation [1] I'm none the wiser.
> Would it be useful to add more values for the profile parameter that
> would allow the client to indicate a preference:
> -    http://www.w3.org/ns/json-ld#embedded 
> -    http://www.w3.org/ns/json-ld#referenced 

I'm not sure. I see how it *might* help in certain use cases but in general I would say this goes too far. Generally, decisions like these should, IMHO, be at the sole discretion of the server. Every option/feature you adds implementation complexity and costs (cache rates go down etc.).

If you really need such a feature to fine tune your applications performance, you can of course mint URLs for this. If we see that people will use this a lot, we might include it in the next version of JSON-LD. At the moment, however, I have so say I'm reluctant to do so.

> These could either be used in combination with the URI
> http://www.w3.org/ns/json-ld#compacted, but just specifying either of
> these should be enough to infer that compacted form is preferred.
> Also when requesting compacted document form, how does a client
> indicate the context which should be used to compact the JSON-LD
> response?

It doesn't. The server decides how to compact. If the client prefers another context, it simply re-compacts the document with its desired context.

> I could imagine the URI of the context might be included in the list
> of URIs for the profile parameter, or perhaps supplied in a HTTP Link
> Header using the http://www.w3.org/ns/json-ld#context link relation.
> The latter is probably less ambiguous.

Why do you want to push that complexity to the server? Why don't you simply request expanded document form an compact it locally?

Markus Lanthaler
Received on Tuesday, 15 April 2014 18:36:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:41 UTC