- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Tue, 24 Jan 2012 00:14:46 +0800
- To: "'Ivan Herman'" <ivan@w3.org>
- Cc: "'Linked JSON'" <public-linked-json@w3.org>
- Message-ID: <02a001ccd9ea$22fad3e0$68f07ba0$@lanthaler@gmx.net>
> > It is a separate issue.. and is not just about that. Consider the
> following
> > JSON-LD document:
> >
> > {
> > "@context": {"homepage": "http://xmlns.com/foaf/0.1/homepage"},
> > "@id": "homepage#me",
> > "homepage": {"@id": "homepage"}
> > }
> >
>
> I see where you are going but I think that
>
> <homepage#me> <http://xmlns.com/foaf/0.1/homepage>
> <http://xmlns.com/foaf/0.1/homepage> .
>
> is probably the right answer, though clearly not the intended one...
That would be the output according to the current spec.
> Ie, if starting to define a microsyntax to expand parts of a string
> (even if we know that the string is a URI) is feature creep for my
> taste.
I can't see any problem with requiring relative IRIs to start with an "/" or
".", that's as much a microsyntax as the use of a colon to separate prefixes
from suffixes:
{
"@context": {"homepage": "http://xmlns.com/foaf/0.1/homepage"},
"@id": "homepage#me",
"homepage": {"@id": "/homepage"}
}
I would even go a step further and say that this makes a JSON-LD document
much more readable and way easier to understand.
> However... what this seems to ask for is a @base. An earlier version of
> JSON-LS had this, afaik; maybe it is time to revisit this?
No, @base wouldn't solve the above issue per se. But you are right, you
could use an empty prefix for this (which basically emulates @base) as
follows:
{
"@context": {
"": "http://www.example.com/",
"homepage": "http://xmlns.com/foaf/0.1/homepage"
},
"@id": "homepage#me",
"homepage": {"@id": ":homepage"}
}
--
Markus Lanthaler
@markuslanthaler
Received on Monday, 23 January 2012 16:15:30 UTC