- From: Alexandre Passant <alex@seevl.net>
- Date: Tue, 13 Dec 2011 15:08:03 +0000
- To: Markus Lanthaler <markus.lanthaler@gmx.net>
- Cc: Linked JSON <public-linked-json@w3.org>
On Tue, Dec 13, 2011 at 4:32 AM, Markus Lanthaler <markus.lanthaler@gmx.net> wrote: >> > @base and @vocab are used to set the base IRI for objects/properties. >> The >> > use cases are not so clear and they don't enable any new >> functionality. So >> > there's a discussion to remove them (ISSUE-26). >> >> I found that one particularly useful. I'd like to hide URIs in JSON >> and base is helpful for this. >> >> e.g >> >> { >> "@base": "http://example.org" >> "friend": { >> "id": "foobar#id", >> } >> } > > So just using a IRI relative to the retrieved document isn't an alternative > for you? Neither is using a prefix that you set to you @base address? > > In this case that could be: > > { > "friend": { > "id": "/foobar#id", // or, e.g., "base:foobar#id" > } > } > > No, relative URL won't work (even though I could do "url":"../xxx" I don't find that elegant, and I also want to avoid prefixed form. >> So +1 from my side to keep it or something similar. > > Did you think about the case where @base is modified in an external context > and how difficult it would be to debug such as case? I haven't think of that - what would be the issue ? > > >> I'd also favor a "@suffix" element, so that I could use >> >> { >> "@base": "http://example.org" >> "@suffix": "#id" >> "friend": { >> "id": "foobar", >> } >> } > > I can't see what kind of functionality a @suffix element would allow.. Could > you elaborate? > That would let JSON authors remove #whatever fro JSON-LD values - and have those automatically added when transforming JSON-LD to RDF > > >> or - compact form proposal >> >> { >> "@base": "http://example.org{@iri}#id" >> "friend": { >> "id": "foobar", >> } >> } > > Same here.. what kind of functionality does this enable? I can see some use > cases where URI templates are needed but that can be described without > having explicit support by JSON-LD as well IMO. Same as before - is there already some templating support in native JSON ? Overall my goal is to make the JSON serialisation as simple as possible - while keeping the RDF-ization of JSON-LD documents as complete as the spec allows. Alex. > > > > -- > Markus Lanthaler > @markuslanthaler > > > -- Dr. Alexandre Passant - @terraces Founder, CEO - http://seevl.net - @seevl http://facebook.com/seevl.net - http://angel.co/seevl
Received on Tuesday, 13 December 2011 17:54:23 UTC