Re: Heads Up: proposal deep linking

+1.

Also to add, in order to make both examples more consistent, I would also be happy to have the language repeated inside the object, i.e.

>  "queenie": {
>    "@id": "http://buckingham.uk/queenie",
>    "label": {
>      "en": { "@value": "The Queen" , "@language" : "en" },
>      "de": { "@value": "Die Königin", "@language" : "de" }
>    }
> }


so that the keys "en" and "de" can both simply be folded away, i.e. translated to:

>   {
>    "@id": "http://buckingham.uk/queenie",
>    "label": [
>     { "@value": "The Queen" , "@language" : "en" },
>     { "@value": "Die Königin", "@language" : "de" }
>    ]
> }

if that makes it any simpler, but the key in both cases would be very convenient in allowing access to the JSON structures, especially exploratory.

Thanks to Gregg for the patience in explaining JSON-LD, I learned a lot today.

Cheers,
Denny

On 5 Jun 2012, at 20:58, Gregg Kellogg wrote:

> In discussion at SemTech, particularly with Denny, I think we need to consider extending the context to allow for a combination of deep linking and property folding.
> 
> Basically, the WikiData use case would like to represent information such as the following:
> 
> {
>  "queenie": {
>    "@id": "http://buckingham.uk/queenie",
>    "label": {
>      "en": { "@value": "The Queen" },
>      "de": { "@value": "Die Königin"}
>    }
> }
> 
> Two things going on here, one would be to allow for a property to be defined for both "en" and "de" (and other languages) which would have the effect of applying a @context to set the @language for the sub-tree rooted by the property, and remove the extra layer of object/property. In essence, "en" would be defined within a context as something such as {"@id": "null", "@language": "en"}, but with some other suggar that indicated that it was to allow deep linking so that the contents would be  processed, yielding something like the following:
> 
> {
>  "queenie": {
>    "@id": "http://buckingham.uk/queenie",
>    "label": [
>     { "@value": "The Queen", "@language": "en },
>     { "@value": "Die Königin", "@language": "de" }
>    ]
> }
> 
> Of course, this could include other properties as well, that would all be presumed to have the specified language. For their use case, this could be extended to describing video content as being in the specified language, but I'm not sure how or if this would be represented in RDF.
> 
> The second thing is the desire to use properties to identify subjects (e.g., "queenie"). Again, this would not actually be turned into semantic entities, but would be convienient for JSON access; it's perfectly okay for the IRI to be repeated in an @id contained within the referenced subject. The property folding/deep linking syntax would also work here. Basically, process the contents and apply to the current subject. However, right now, if "queenie" was unmapped, or mapped to null, the sub-tree would not be processed. This could be done essentially the same as the "en"/"de" case, but not necessarily adding a language.
> 
> We could potentially have some @context syntax such as the following:
> 
> "@context": {
>  "en": {"@id": null", "@language": "en", "@fold": true},
>  "de": {"@id": null", "@language": "de", "@fold": true},
>  "queenie": {"@id": null", "@fold": true}
> }
> 
> This wouldn't have to survive expansion, but should probably work with framing, so that you could re-create this structure.
> 
> If we can do something like this, then Denny indicated that JSON-LD would be pretty much a perfect match for WikiData.
> 
> For some more on the WikiData talk page, look at [1].
> 
> Thoughts?
> 
> Gregg
> 
> [1] http://meta.wikimedia.org/wiki/Talk:Wikidata/Data_model/JSON#How_would_that_be_expressed_in_JSON-LD.3F

Received on Wednesday, 6 June 2012 04:07:25 UTC