RE: an idea: @context in coercion rules ?

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 UTC