W3C home > Mailing lists > Public > public-linked-json@w3.org > January 2018

Re: Changes in Community Group Drafts Targeted for 1.1 · json-ld/json-ld.org Wiki

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Mon, 29 Jan 2018 09:29:59 -0800
Message-Id: <E6BF176F-F167-4A50-83A9-BD6A9938CF8B@greggkellogg.net>
Cc: public-linked-json@w3.org
To: Kingsley Idehen <kidehen@openlinksw.com>
Hi Kingsley, did you try it on the new development playground: [1]. You should also be able to run it on my own distiller: [2].

The reason the “databaseId” is not transformed is that JSON-LD separates the concept of “document base” and “vocabulary base”. JSON Keys are interpreted as IRIs relative to the vocabulary base, which is not established in the context, so it is dropped. Try adding "@vocab": "http://example/“ to the context:

{"@context":
  {
     "schema": "http://schema.org/",
    "@base": "#",
    "@vocab": "http://example/"
  },
    "@id": "#BrewEats",
    "@type": "schema:Restaurant",
    "schema:name": "Brew Eats",
    "databaseId": "23987520"
}

There is (currently) now way to say that the vocabulary base is the same as the document base, which seems to be what you’re after. Given a suitable syntax, this is something that could be considered for the 1.1 work. Note, this is pretty much the same as Issue #488 [3], addressed in PR #573 [4].

Note that these are all serialization issues; in the case of Turtle and other serializations, relative IRIs are always relative to the document base (although RDFa does have an @vocab attribute), but this was not practical in the design of JSON-LD (at least, as considered in the 1.0 timeframe). As you know, the RDF datamodel does not support relative IRIs, that is an interpretation of concrete serializations.

Gregg Kellogg
gregg@greggkellogg.net

[1] https://json-ld.org/playground-dev/ <https://json-ld.org/playground-dev/>
[2] http://rdf.greggkellogg.net/distiller?command=expand&format=jsonld&output_format=jsonld <http://rdf.greggkellogg.net/distiller?command=expand&format=jsonld&output_format=jsonld>
[3] https://github.com/json-ld/json-ld.org/issues/488 <https://github.com/json-ld/json-ld.org/issues/488>
[4] https://github.com/json-ld/json-ld.org/pull/573

> On Jan 27, 2018, at 6:34 PM, Kingsley Idehen <kidehen@openlinksw.com> wrote:
> 
> On 1/26/18 7:50 PM, Gregg Kellogg wrote:
>> I summarized information from the TPAC presentation into a wiki page maintained on the json-ld.org repo [1].
>> 
>> Gregg Kellogg
>> gregg@greggkellogg.net <mailto:gregg@greggkellogg.net>
>> 
>> [1] https://github.com/json-ld/json-ld.org/wiki/Changes-in-Community-Group-Drafts-Targeted-for-1.1 <https://github.com/json-ld/json-ld.org/wiki/Changes-in-Community-Group-Drafts-Targeted-for-1.1>
>> 
>> 
>> 
> Hi Gregg,
> 
> I still can't get the following to parse correctly via JSON-LD playground or anywhere else.  {
> 
>   "@context":
>   {
>      "schema": "http://schema.org/" <http://schema.org/>,
>     "@base": "#"  
>   },
>     "@id": "#BrewEats",
>     "@type": "schema:Restaurant",
>     "schema:name": "Brew Eats",
>     "databaseId": "23987520"
> }
> 
> What is the JSON-LD equivalent for the following RDF-Turtle statement collection, 
> Where the rendered output does not exclude <#databaseId> key and "23987520" value?
>  
> 
> @prefix schema: <http://schema.org/> <http://schema.org/>. 
> 
> <#BrewEats> 
> a schema:Restaurant;
> schema:name "Brew Eats";
> <#databaseId> "23987520". 
>  
> -- 
> Regards,
> 
> Kingsley Idehen	      
> Founder & CEO 
> OpenLink Software   (Home Page: http://www.openlinksw.com <http://www.openlinksw.com/>)
> 
> Weblogs (Blogs):
> Legacy Blog: http://www.openlinksw.com/blog/~kidehen/ <http://www.openlinksw.com/blog/~kidehen/>
> Blogspot Blog: http://kidehen.blogspot.com <http://kidehen.blogspot.com/>
> Medium Blog: https://medium.com/@kidehen <https://medium.com/@kidehen>
> 
> Profile Pages:
> Pinterest: https://www.pinterest.com/kidehen/ <https://www.pinterest.com/kidehen/>
> Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen <https://www.quora.com/profile/Kingsley-Uyi-Idehen>
> Twitter: https://twitter.com/kidehen <https://twitter.com/kidehen>
> Google+: https://plus.google.com/+KingsleyIdehen/about <https://plus.google.com/+KingsleyIdehen/about>
> LinkedIn: http://www.linkedin.com/in/kidehen <http://www.linkedin.com/in/kidehen>
> 
> Web Identities (WebID):
> Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i <http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i>
>         : http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this <http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this>
> 


Received on Monday, 29 January 2018 17:30:25 UTC

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