Comments (7)
@iherman fwiw, @gkellogg's Distiller creates these n-quads from the same JSON-LD...so there may indeed be a bug in the playground.
Here are the n-quads from the Distiller--which match what you were after:
_:g524580 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiablePresentation> .
_:g524580 <https://www.w3.org/2018/credentials#verifiableCredential> _:g524600 .
<http://university.example/credentials/1872> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiableCredential> _:g524600 .
<http://university.example/credentials/1872> <https://www.w3.org/2018/credentials#issuer> <https://university.example/issuers/565049> _:g524600 .
I'll do some more direct testing with jsonld.js
(which is used on the Playground), and see how deep the rabbit hole goes. @davidlehn may have other thoughts.
from vc-data-model.
@iherman fwiw, @gkellogg's Distiller creates these n-quads from the same JSON-LD...so there may indeed be a bug in the playground.
Here are the n-quads from the Distiller--which match what you were after:
_:g524580 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiablePresentation> . _:g524580 <https://www.w3.org/2018/credentials#verifiableCredential> _:g524600 . <http://university.example/credentials/1872> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiableCredential> _:g524600 . <http://university.example/credentials/1872> <https://www.w3.org/2018/credentials#issuer> <https://university.example/issuers/565049> _:g524600 .I'll do some more direct testing with
jsonld.js
(which is used on the Playground), and see how deep the rabbit hole goes. @davidlehn may have other thoughts.
Phew. From the point of view of VCDM I am relieved (and also from the point of view of my own understanding...).
@msporny @brentzundel I am not sure whether we want to close this issue (being irrelevant for the VCDM spec) or leave it open until is handled, to avoid errors in discussions like in #1358 (comment) or #1358 (comment). I leave this decision to you. In any case, I removed the before-CR label.
from vc-data-model.
I suspect it's a bug in handling scoped context in jsonld.js. Looking at the credentials/v2 context definition:
VerifiablePresentation
is a term which is used as a type in the outermost object, thus the type-scoped context it defines is used for expanding the rest of that object, which includes the term definition forverifiableCredential
verfiableCredential
which is in scope has a@container: @graph
, meaning that its value is taken to be a named graph, which at least in my implementation, gets a blank node graph label. It also sets@context: null
, but establishes a new@context
which is used to expand the values of that graph object.
For some reason, jsonld.js does not seem to interpret the value of verifiableCredential
as being a blank graph. I would have thought that some test would catch this case, though.
from vc-data-model.
FWIW, Sophia, which is based on @timothee-haudebourg's JSON-LD library, also parses this correctly: example.
from vc-data-model.
There was missing JSON-LD test coverage for this use case and a jsonld.js bug. A JSON-LD test suite test was submitted, jsonld.js patched, and the json-ld.org playground was updated. It should work as expected now.
from vc-data-model.
The issue was discussed in a meeting on 2023-12-06
- no resolutions were taken
View the transcript
2.8. Bug in the context file? (issue vc-data-model#1373)
See github issue vc-data-model#1373.
Brent Zundel: I think this one is before CR.
Manu Sporny: It's before CR.
Dave Longley: +1 to before CR.
Orie Steele: I would like some elaboration to be in the minutes: could someone explain the essence of the bug?
Dave Longley: It's not that we have a bug in our context file. It's that we added terms to make v1 VCs compatible with v2 Verifiable Presentations.
… We needed to make sure that context files for v1 VCs didn't affect the context files for v2 VPs.
… Some implementations had bugs, some didn't.
… We should be able to resolve this by nullifying the context as part of these implementations.
… We don't need to do anything in this WG.
Orie Steele: Sounds like there is no bug in our context, and this issue should be closed. It also sounds like there are buggy JSON-LD processors, that produce inconsistencies, that cause credentials to not verify.
Dave Longley: Orie: It is a reasonable expectation for any software is that there will be bugs from time to time.
Orie Steele: the complicated the software, the more reasonable it is to expect bugs.
Dave Longley: Orie: sometimes! :) ... i would say that it's not a good idea to assume simple software is less likely to be buggy (as this may lead to more likely bugs in such software).
Manu Sporny: You're coming across as trolling, Orie. Please stop. You asked us to explain something. We did, and now you're expressing what comes across as mock surprise.
from vc-data-model.
The bug has indeed been handled and the example works as expected.
This means that the issue turned out not to be in our @context
file, so there is no action for this WG.
from vc-data-model.
Related Issues (20)
- Specify that it is important to validate the `issuer` value HOT 8
- Specify what kind of processing is safe on a returned document HOT 21
- Ensure `credentialStatus` `id` field is optional HOT 5
- Verifying a VC should return the same credential regardless of the verification method HOT 3
- Clarify embedded proof extension point HOT 3
- phrasing and/or punctuation for input "inputBytes or inputDocument and inputMediaType" needs work HOT 4
- reconsider `@id` for `mediaType` term HOT 17
- Does the specification need a normative "Credential Type Specifications" section? HOT 5
- (editorial) "bitstring" vs "bit string" HOT 1
- `Type-Specific Credential Processing` is better phrasing than `Credential Type-Specific Processing` HOT 2
- Backtick characters in Internationalization / Language examples HOT 2
- typo in Terms of Use HOT 2
- Support of SHACL Schema in Version 2.0 HOT 4
- "…" as a term name in the context file? HOT 2
- Unnecessary direction attribute? HOT 12
- EnvelopedVerifiablePresentation missing in data model HOT 5
- first example contains an http url identifying a credential HOT 5
- Remove at risk issue markers for property extension points. HOT 3
- What does the hash values in §B.2 mean? HOT 4
- Proposal: remove ambiguity and asymmetry as it relates to subject identifiers HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vc-data-model.