You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ Readable }=require('stream');const{ JsonLdParser }=require('jsonld-streaming-parser');// This is example 6 from https://json-ld.github.io/json-ld-star/#example-reversing-annotations// modified by wrapping everything into a "@graph"constdocument={"@context": {"@base": "http://foo/","@vocab": "http://foo/","accordingTo": {"@type": "@id"},"claimedBy": {"@reverse": "http://foo/claims","@type": "@id"}},"@id": "graphid","@graph": {"@id": "bob","knows": {"@id": "alice","@annotation": {"accordingTo": "alice","claimedBy": "bob"}}}};constinput=newReadable.from([JSON.stringify(document)]);constparser=(newJsonLdParser()).import(input);parser.on('data',(quad)=>{console.log(quad);});newPromise((resolve,reject)=>{parser.on('end',resolve);parser.on('error',reject);});
Running the code below logs an equivalent of this RDF-star (notice that 2nd and 3rd quads are missing the 4th "graph" element):
But it seems that this RDF-star is expected:
Exact output
The text was updated successfully, but these errors were encountered: