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

Document how VCs are processed as JSON today #1201

Closed
msporny opened this issue Jul 14, 2023 · 5 comments
Closed

Document how VCs are processed as JSON today #1201

msporny opened this issue Jul 14, 2023 · 5 comments

Comments

@msporny
Copy link
Member

msporny commented Jul 14, 2023

There are a variety of deployed systems that process VCs as JSON today.

The v1.0 and v1.1 specification provided clear guidance on how to process a VC using only JSON tooling and a little extra logic (from the latest published VCDM v1.1 global standard):

NOTE: Though this specification requires that a @context property be present, it is not required that the value of the @context property be processed using JSON-LD. This is to support processing using plain JSON libraries, such as those that might be used when the verifiable credential is encoded as a JWT. All libraries or processors MUST ensure that the order of the values in the @context property is what is expected for the specific application. Libraries or processors that support JSON-LD can process the @context property using full JSON-LD processing as expected.

This guidance was removed in PR #1182 and it is leading to confusion in the ecosystem; people are starting to believe that you can't process a VC in "pure JSON" mode, and that does not reflect the reality that organizations are doing just that today. Here are the use cases where VCs are processed in "pure JSON" mode today:

  • When using the VC-JOSE-COSE specification to sign, processing performed is purely JSON-based.
  • When performing JSON Schema validation (via vc-json-schema), processing performed is purely JSON-based.
  • When serializing/deserializing VCs into document-oriented databases (or databases in general), processing performed is purely JSON-based (or text-based).
  • When operating on the data in a software application, after verification is performed, processing performed is often JSON-based.

The specification used to be clear about this, and after PR #1182 was merged, is no longer clear about this reality. What was in the specification before should be improved. We need to document that the ecosystem is performing this sort of processing today on VCs and that it's an entirely legitimate way to process this data. IOW, JSON-LD processing is optional in a number of cases, and is only mandatory when you want to ensure that the semantics are well formed (and there are a number of use cases where you don't need to do that).

@msporny
Copy link
Member Author

msporny commented Jul 14, 2023

PR #1202 has been raised to address this issue. This issue will be closed if PR #1202 is merged.

@OR13
Copy link
Contributor

OR13 commented Aug 3, 2023

@msporny which issue tracks the "value of JSON-LD" ?

@msporny
Copy link
Member Author

msporny commented Aug 3, 2023

@msporny which issue tracks the "value of JSON-LD" ?

There isn't one yet, feel free to create one w/ the text that you'd like to see in that section.

Presently, we have this section in the specification:

https://w3c.github.io/vc-data-model/#json-ld

I expect that the text you want could go in that section.

@OR13
Copy link
Contributor

OR13 commented Aug 3, 2023

@msporny I know we have a had a few conversations on this, if you or @iherman can add any details to #1227 please do so.

@msporny
Copy link
Member Author

msporny commented Aug 10, 2023

PR #1202 has been merged. Closing.

@msporny msporny closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants