Skip to content

Missing data when inner contexts are present #122

Open
@jeswr

Description

@jeswr

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions