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

Re: Nested property mapping in @context

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Tue, 25 Nov 2014 10:06:55 -0500
Cc: Linked JSON <public-linked-json@w3.org>
Message-Id: <966A3BD4-3755-4531-A5D9-B9C0A85F0DDA@greggkellogg.net>
To: Hendy Irawan <ceefour666@gmail.com>
> 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

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