Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing data when inner contexts are present #122

Open
jeswr opened this issue Nov 25, 2023 · 0 comments
Open

Missing data when inner contexts are present #122

jeswr opened this issue Nov 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jeswr
Copy link
Contributor

jeswr commented Nov 25, 2023

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()
@rubensworks rubensworks added the bug Something isn't working label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants