Skip to content

Framing JSON-LD Star #58

Open
Open
@saumier

Description

@saumier

When using Annotation Objects in a JSON-LD-star document, and then using JSON-LD Framing, I am losing the @Annotate node.

Does JSON::LD::API.frame need to have the setting rdfstar: true ?

 input =  JSON.parse %({
      "@context": {
        "@base":"http://www.artsdata.ca/resource/",
        "@vocab":"http://www.artsdata.ca/resource/"
      },
      "@graph": [
        {
          "@id": "TheShow",
          "@type": "Performance",
          "performer": {
            "@id": "John",
            "@annotation": {
                "certainty": 1
            }
          }
        },
        {
          "@id": "John",
          "@type": "Person",
          "name" : "John Smith"
        }
      ]
    })

frame = JSON.parse %({
      "@context": {
        "@vocab": "http://ontology.artsdata.ca/"
       },
       "@type": "Performance"
    })

JSON::LD::API.frame(input, frame)

The above example results in the loss of the @Annotate node as shown below:

{
  "@context"=>{
     "@base"=>"http://www.artsdata.ca/resource/", 
     "@vocab"=>"http://www.artsdata.ca/resource/"
  }, 
  "@id"=>"TheShow", 
  "@type"=>"Performance", 
  "performer"=>{"@id"=>"John", "@type"=>"Person", "name"=>"John Smith"}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions