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

added clarifying note to @context section #535

Merged
merged 4 commits into from
Apr 10, 2019

Conversation

brentzundel
Copy link
Member

This PR address some points of issues #483 and #491
Signed-off-by: Brent brent.zundel@gmail.com

Signed-off-by: Brent <brent.zundel@gmail.com>
@brentzundel brentzundel requested a review from msporny April 8, 2019 17:15
index.html Outdated Show resolved Hide resolved
Copy link
Member

@msporny msporny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to do JSON-LD processing, but you should do JSON-based processing on the value of @context (by just doing a simple array comparison). Again, it's optional, but if you don't do it as a JSON based processor, you have no idea if you're compatible w/ something that would do JSON-LD processing.

index.html Outdated Show resolved Hide resolved
index.html Outdated
Though this specification requires that a <code>@context</code> <a>property</a>
be present, there is no requirement that the value of the <code>@context</code>
property be processed using JSON-LD. This is to support compatibility with
certain JSON processing libraries such as those that may be used when the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dislike how this is phrased, the use of "certain" sounds weasely, like some JSON libraries are insufficient but others are good. Truth is, any plain JSON library isn't going to care about JSON-LD, but it can do a syntax check for specific values in a specific field. Suggest backing this off a bit:

Suggested change
certain JSON processing libraries such as those that may be used when the
This is to support processing using plain JSON libraries such as those...```

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes made in 665e076

index.html Outdated
certain JSON processing libraries such as those that may be used when the
<a>verifiable credential</a> is encoded as a JWT.
For JSON-LD aware processors to properly function, the <code>@context</code>
needs to be processed. For JSON processors, it is sufficient to ensure that the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What worries me about this is that if I get sent a JSON-LD document every time, why wouldn't I just always do the (simpler) JSON processing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only time you need to do any more than that simple processing is if you want to translate the data to use some other @context or into some other structure or format. It may be better to say "JSON-LD aware processors can process the @context using a full JSON-LD processor as expected. For other processors, the only processing necessary is to ensure that the...".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes made in 665e076

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only time you need to do any more than that simple processing is if you want to translate the data to use some other @context or into some other structure or format.

Also, if you're using LD Proofs / LD Signatures to generate a signature (or verify one), then you will have to do C14N, which will require you to do JSON-LD processing. So, if you live in JWT land and don't want to use JSON-LD, you don't have to (modulo the simple @context array string comparison). If you want what JSON-LD provides, or want LD Proofs/Signatures, then you can do extra processing to get those benefits.

Signed-off-by: Brent <brent.zundel@gmail.com>
@msporny
Copy link
Member

msporny commented Apr 10, 2019

Merging, non-normative, editorial. Multiple independent review approvals and the author has implemented all requested changes to the spec text.

@msporny msporny merged commit 8b33f8e into w3c:gh-pages Apr 10, 2019
This was referenced Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants