Open
Description
In the following example only one triple is returned ([] a cred:VerifiablePresentation
). There should be 4 triples returned from parsing this.
import { JsonLdParser } from 'jsonld-streaming-parser';
const data = JSON.stringify({
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": "VerifiablePresentation",
"holder": "https://vc.inrupt.com",
"verifiableCredential": [
{
"id": "https://vc.inrupt.com/vc/fb676ac9-820b-40da-adaa-c86d38fd6335",
"type": [
"VerifiableCredential"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://schema.inrupt.com/credentials/v1.jsonld",
"https://w3id.org/security/data-integrity/v1",
"https://w3id.org/vc-revocation-list-2020/v1",
"https://w3id.org/vc/status-list/2021/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
]
}
]
});
const parser = new JsonLdParser();
parser.on('data', console.log)
parser.write(data);
parser.end()