W3C home > Mailing lists > Public > public-linked-json@w3.org > July 2012

RE: an idea: @context in coercion rules ?

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Wed, 11 Jul 2012 17:14:08 +0200
To: 'Stéphane Corlosquet' <scorlosquet@gmail.com>, "'Pierre-Antoine Champin'" <pierre-antoine.champin@liris.cnrs.fr>
Cc: <public-linked-json@w3.org>, <public-rdf-wg@w3.org>
Message-ID: <014101cd5f77$d2bd7130$78385390$@lanthaler@gmx.net>
On Wednesday, July 11, 2012 4:17 PM, Stéphane Corlosquet wrote:
> Interestingly I was thinking along the same line last night.
> My use case was a nested object where the same key happens to
> appear at different levels of nesting, much like Pierre-Antoine's
> example. In other words, this would allow overriding the context
> inside a nested element of a JSON object. A good example is for
> the example a key 'item' which might appear at several levels of
> nesting, and that might qualify for a different mapping depending
> on what level it's at.

The way we address this as the moment is by adding a @context to the nested
object to redefine properties (terms). The advantage of the solution
proposed by Pierre-Antoine is that it could also be used for legacy JSON
where it is impossible to inject @context definitions into the data.

I created ISSUE-144 for this [1]. Lets continue the discussion there.


[1] https://github.com/json-ld/json-ld.org/issues/144



--
Markus Lanthaler
@markuslanthaler
Received on Wednesday, 11 July 2012 15:14:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:37 GMT