Skip to content

Commit

Permalink
Reflow and clarify Media Type Precision section.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Aug 22, 2024
1 parent 8d6bd23 commit 4c3a158
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4436,8 +4436,8 @@ <h3>Media Type Precision</h3>

<p>
At times, developers or systems might use lower precision media types to convey
[=verifiable credentials=] or [=verifiable presentations=]. Some of the
reasons for use of lower precision media types include:
[=verifiable credentials=] or [=verifiable presentations=]. Some of the reasons
for use of lower precision media types include:
</p>

<ul>
Expand All @@ -4461,11 +4461,10 @@ <h3>Media Type Precision</h3>
Implementers are urged to not raise errors when it is possible to determine the
intended media type from a payload, provided that the media type used is
acceptable in the given protocol. For example, if an application only accepts
payloads that conform to the rules associated with the `application/vc`
media type, but the payload is tagged with `application/json` or
`application/ld+json` instead, the application might perform the following
steps to determine whether the payload also conforms to the higher precision
media type:
payloads that conform to the rules associated with the `application/vc` media
type, but the payload is tagged with `application/json` or `application/ld+json`
instead, the application might perform the following steps to determine whether
the payload also conforms to the higher precision media type:
</p>

<ol>
Expand All @@ -4477,18 +4476,18 @@ <h3>Media Type Precision</h3>
`https://www.w3.org/2018/credentials/v2`.
</li>
<li>
Assume an `application/vp` media type if the JSON document contains a
top-level `type` property containing a `VerifiablePresentation` element. Additional
Assume an `application/vp` media type if the JSON document contains a top-level
`type` property containing a `VerifiablePresentation` element. Additional
subsequent checks are still expected to be performed (according to this
specification) to ensure the payload expresses a conformant Verifiable
Presentation.
specification) to ensure the payload expresses a conformant
[=verifiable presentation=].
</li>
<li>
Assume an `application/vc` media type if the JSON document contains a
top-level `type` property containing a `VerifiableCredential` element. Additional
Assume an `application/vc` media type if the JSON document contains a top-level
`type` property containing a `VerifiableCredential` element. Additional
subsequent checks are still expected to be performed (according to this
specification) to ensure the payload expresses a conformant Verifiable
Credential.
specification) to ensure the payload expresses a conformant
[=verifiable credential=].
</li>
</ol>

Expand All @@ -4507,9 +4506,9 @@ <h3>Media Type Precision</h3>
<p>
HTTP clients and servers use media types associated with [=verifiable
credentials=] and [=verifiable presentations=] in accept headers and when
indicating content types. Nonetheless, HTTP servers might ignore the accept
header and return another content type, or return an error code such as
<a data-cite="RFC7231#section-6.5.13">`415 Unsupported Media Type`</a>.
indicating content types. Implementers are warned that HTTP servers might ignore
the accept header and return another content type, or return an error code such
as <a data-cite="RFC7231#section-6.5.13">`415 Unsupported Media Type`</a>.
</p>
</section>
</section>
Expand Down

0 comments on commit 4c3a158

Please sign in to comment.