Re: JSON-LD & nested structure

On 07/29/2016 08:44 AM, Aymeric Brisse wrote:
> Hi Gregg,
>
> Thanks for the reply. I played with the JSON-LD Frame feature and it is
> pretty cool. The problem is that it seems to be a "feature in progress"
> since it only works on some case:
>
> /ISSUE 110/
> /Currently, framing allows just to select node definitions based on
> @type matching or duck typing for included properties. It allows value
> properties to be explicitly matched based on defining the property and
> excluding things that are undefined, but it does not allow to be more
> specific about the types of values selected. Allowing this is currently
> being discussed./
>
> (Source: http://json-ld.org/spec/latest/json-ld-framing/)
>
> In my case to specify a root entity I would like to be able to specify
> an @id filter instead of a @type (since my root entity can be linked to
> other entities of the same type)
>
> frame = JSON.parse %({
>    "@context": {
>      ....
>    },
>    "@id": "http://www.myresource/uuid"
> })
>
> What would you recommend? Adding a fake rdf:type for the JSON-LD
> serialization and remove it after?

Try out `@id` and see if it works. I think that's been implemented, but 
may be recalling improperly.


-- 
Dave Longley
CTO
Digital Bazaar, Inc.
http://digitalbazaar.com

Received on Friday, 29 July 2016 15:42:00 UTC