Re: Nested property mapping in @context

> On Nov 24, 2014, at 10:23 PM, Hendy Irawan <ceefour666@gmail.com> wrote:
> 
> For example I'd like to have this JSON-LD:
> 
> {
>   "urn:foo#value": "Car",
>   "urn:foo#children": [
>     {"urn:bar#value": "George"},
>     {"urn:bar#value": "Stacy"}
>   ]
> }
> 
> Be compacted to just:
> 
> {
>   "@context": ???,
>   "value": "Car",
>   "children": [
>     {"value": "George"},
>     {"value": "Stacy"}
>   ]
> }
> 
> So my problem is:
> 1. There are two "value", mapped to different LD URIs (urn:foo# and urn:bar#). But they are in different level. I want both to use the shortened "value", not "valueA" and "valueB".
> 2. I'd like to have only a single @context in the document, which covers both "value"s.
> 
> Is this possible?

Not possible in JSON-LD 1.0, but it’s been considered for a future update [1].

Gregg

[1] https://github.com/json-ld/json-ld.org/issues/247 <https://github.com/json-ld/json-ld.org/issues/247>

> Thank you.
> 
> 
> Hendy Irawan - on Twitter <http://twitter.com/hendybippo> - on LinkedIn <http://id.linkedin.com/in/hendyirawan>
> Web Developer | Bippo Indonesia <http://www.bippo.co.id/> | Akselerator Bisnis | Bandung

Received on Tuesday, 25 November 2014 15:07:25 UTC