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

Specify that semantics are the same if @context is not used. #106

Merged
merged 2 commits into from
Oct 19, 2024

Conversation

msporny
Copy link
Member

@msporny msporny commented Oct 13, 2024

This PR is an attempt to partially address issue #94 by specifying that document semantics are the same even when @context is not used.

/cc @jyasskin and @hadleybeeman


Preview | Diff

index.html Outdated
@@ -2532,7 +2532,11 @@ <h4>Context Injection</h4>

<p>
Implementations that do not intend to use JSON-LD MAY choose to not include an
`@context` declaration at the top-level of the document.
`@context` declaration at the top-level of the document. Whether the `@context`
value or JSON-LD processors are used or not, the semantics for all properties
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
value or JSON-LD processors are used or not, the semantics for all properties
value and/or JSON-LD processors are used or not, the semantics for all properties

Copy link
Member

@TallTed TallTed Oct 15, 2024

Choose a reason for hiding this comment

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

Included in my suggestion below.

index.html Outdated Show resolved Hide resolved
index.html Outdated
@@ -2532,7 +2532,11 @@ <h4>Context Injection</h4>

<p>
Implementations that do not intend to use JSON-LD MAY choose to not include an
`@context` declaration at the top-level of the document.
`@context` declaration at the top-level of the document. Whether the `@context`
value or JSON-LD processors are used or not, the semantics for all properties
Copy link
Member

@TallTed TallTed Oct 15, 2024

Choose a reason for hiding this comment

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

Included in my suggestion below.

@iherman
Copy link
Member

iherman commented Oct 16, 2024

The issue was discussed in a meeting on 2024-10-16

  • no resolutions were taken
View the transcript

4.2. Specify that semantics are the same if @context is not used. (pr controller-document#106)

See github pull request controller-document#106.

Manu Sporny: the TAG said a JSON-LD processor might resolve to a different solution to pure JSON processing, so need to make clear that this is not the case.
… so even if @context is not there, the result should still be the same.
… if you get two different results then you have a bug in one of your processors.

Ivan Herman: +1 to put this into VCDM.

Phillip Long: +1 to putting this in the VCDM for consistency.

@pchampin
Copy link

This was discussed during the did meeting on 17 October 2024.

View the transcript

w3c/did-core#863

manu: during TPAC, the TAG suggested to add some text in the VC documents about JSON-LD,
… but that also applies to the DID WG.
… The text is to explain (even more) clearly that downloading JSON-LD contexts from the web is not necessary for complying with the standard.
… And that processing a VC or DID document as JSON is equivalent to processing it as JSON-LD.
… The proposal was to add some text saying "any difference in the behaviour between JSON and JSON-LD would be a bug of this spec"
… We have some text to this effect in VC.
… In the Controller Document spec, we got to a point where there is no difference between JSON and JSON-LD processing.
… As a side effect, we can have a single media-type.

<ivan> VC's version on the JSON(-LD) that Manu was talking about:

manu: We never picked a media-type because of 5-year long debate at IETF about multiple suffixes in media-types.
… The proposal to this group is to do the same for did: would people be happy with a media-type like application/did ?
… We haven't heard any pushback so far. Should be take a resolution?

markus_sabadello: A CBOR representation would have a different media type, but there would be no difference between JSON and JSON-LD?

manu: correct

markus_sabadello: I think that would be fine, sounds like a good idea, one thing I'm wondering, separate media type for DID Resolution result.

markus_sabadello: Separate media type for that, I think that's fine, sounds like a separate question we can discuss separately, but don't think there would be any implications/problems, sounds good.

manu: I agree, we should have a separate media-type for DID Resolution results.
… Another thing we did in VC is tell people "use the most accurate media-type when you serve these documents".
… Many people get media-types wrong, so often that people are encouraged to not rely on media-types.
… For a JSON(-LD) prepresentation, this would be application/did ; for a CBOR representation, this would be something like application/did+cbor .
… Serving a DID document as application/ld+json or application/json is not wrong, but not optimal.
… A text to this effect has reached consensus in the VC WG, I will do something similar for DID.
… Developers should be ready to deal with lower fidelity media-types.

Wip: Quick comment, this text is in the controller document, will we rely on that? Controller document has its own media type?

manu: good question. I think the Controller Document will have its own media-type.
… We don't want to duplicate content. I try to get a sense of what the group wants.
… We fist need a decision on the DID document media-type, then we can discuss the rest.

Wip: Any comments on the draft proposals?

pchampin: Without being too pedantic, the spec makes a clear disctinction between a DID and a DID Document, application/did might be a bit confusing since a DID is an identifier?

manu: I take your point. I'm wondering if it matters all that much?

<ivan> +1 manu

manu: I don't think we would ever serve a pure DID with a media-type.
… It feels nicer to have a short compact media-type.

PROPOSAL: The media type for the JSON and JSON-LD expression of a DID Document will be application/did.

<dmitriz> +1

<TallTed> +1

<Wip> +1

<manu> +1

<ivan> +1

<markus_sabadello> +1

<pchampin> +0.5

<JennieM> +1

<bigbluehat> +1

RESOLUTION: The media type for the JSON and JSON-LD expression of a DID Document will be application/did.

PROPOSAL: The specification should warn that it is possible to use lower fidelity media types like application/json or application/ld+json to serve DID Documents and that implementations should be aware of this fact and use the highest precision media type in their applications.

<manu> +1

<Wip> +1

<dmitriz> +1

<TallTed> +1

<JennieM> +1

<ivan> +1

<JoeAndrieu> +1

<markus_sabadello> +1

<pchampin> +1

RESOLUTION: The specification should warn that it is possible to use lower fidelity media types like application/json or application/ld+json to serve DID Documents and that implementations should be aware of this fact and use the highest precision media type in their applications.


@msporny
Copy link
Member Author

msporny commented Oct 19, 2024

Substantive, multiple reviews, changes requested and made, no objections, merging.

@msporny msporny merged commit 78714b4 into main Oct 19, 2024
1 check passed
@msporny msporny deleted the msporny-interpretation branch October 19, 2024 20:57
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.

7 participants