Skip to content

Commit

Permalink
Implement Data Model / Resolution serialization mechanisms.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Feb 19, 2021
1 parent 253625a commit 70f1a95
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ <h2>DID Parameters</h2>
A relative <a>URI</a> reference according to <a
data-cite="RFC3986#section-4.2">RFC3986 Section 4.2</a> that identifies a
<a>resource</a> at a <a>service endpoint</a>, which is selected from a <a>DID
document</a> by using the <code>service</code> parameter.
document</a> by using the <code>service</code> parameter.
If present, the associated value MUST be an <a
data-lt="ascii string">ASCII string</a> and MUST use percent-encoding for
certain characters as specified in <a data-cite="RFC3986#section-2.1">RFC3986
Expand Down Expand Up @@ -1028,7 +1028,7 @@ <h2>DID Parameters</h2>
</td>
<td>
A resource hash of the <a>DID document</a> to add integrity protection, as
specified in [[?HASHLINK]]. This parameter is non-normative.
specified in [[?HASHLINK]]. This parameter is non-normative.
If present, the associated value MUST be an
<a data-lt="ascii string">ASCII string</a>.
</td>
Expand Down Expand Up @@ -1134,10 +1134,10 @@ <h2>Relative DID URLs</h2>
<h1>Data Model</h1>
<p>
This specification defines a data model that can be used to express <a>DID
documents</a> and other data structures that can then be serialized into
multiple concrete <a>representations</a>. This section provides a high-level
description of the data model, how different types of properties are expressed
in the data model, and instructions for extending the data model.
documents</a> and DID document data structures, which can then be serialized
into multiple concrete <a>representations</a>. This section provides a
high-level description of the data model, how different types of properties are
expressed in the data model, and instructions for extending the data model.
</p>
<p>
A <a>DID document</a> consists of a <a data-cite="INFRA#maps">map</a> of <a
Expand Down Expand Up @@ -1266,12 +1266,6 @@ <h1>Data Model</h1>
</tbody>
</table>

<p>
Other data structures that are not <a>DID documents</a> can also use the data
model and <a>representations</a> to express information. An example of this
is elaborated upon in <a href="#metadata-structure"></a>.
</p>

<p class="advisement" title="Ordering of values">
As a result of the <a href="#data-model">data model</a> being defined using
terminology from [[INFRA]], property values which can contain more than one
Expand Down Expand Up @@ -2618,10 +2612,10 @@ <h3>Production</h3>
<p class="advisement" title="INFRA JSON serialization rules">
All implementers creating <a>conforming producers</a> that produce JSON
<a>representations</a> are advised to ensure that their algorithms are aligned
with the <a data-cite="INFRA#json">JSON serialization rules</a> in the [[INFRA]]
specification and the
<a data-cite="RFC7159#section-6">precision advisements regarding Numbers</a>
in the JSON [[RFC7159]] specification.
with the <a data-cite="INFRA##serialize-an-infra-value-to-json-bytes">JSON
serialization rules</a> in the [[INFRA]] specification and the <a
data-cite="RFC7159#section-6">precision advisements regarding Numbers</a> in the
JSON [[RFC7159]] specification.
</p>

<p>
Expand Down Expand Up @@ -2767,7 +2761,7 @@ <h3>Consumption</h3>
All implementers creating <a>conforming consumers</a> that produce JSON
<a>representations</a> are advised to ensure that their algorithms are aligned
with the <a
data-cite="INFRA#convert-a-json-derived-javascript-value-to-an-infra-value">JSON
data-cite="INFRA#parse-json-bytes-to-an-infra-value">JSON
conversion rules</a> in the [[INFRA]] specification and the <a
data-cite="RFC7159#section-6">precision advisements regarding Numbers</a> in the
JSON [[RFC7159]] specification.
Expand Down Expand Up @@ -2944,9 +2938,9 @@ <h2>CBOR</h2>
<h3>Production</h3>

<p>
All <a>DID document</a> data structures expressed by the <a href="#data-model">data model</a>
MUST be serialized to the CBOR <a>representation</a> according to the
following <a>production</a> rules:
The <a>DID document</a> and any DID document data structures expressed by the <a
href="#data-model">data model</a> MUST be serialized to the CBOR
<a>representation</a> according to the following <a>production</a> rules:
</p>

<table class="simple" id="cbor-representation-production">
Expand Down Expand Up @@ -3132,9 +3126,10 @@ <h3>Production</h3>
<h3>Consumption</h3>

<p>
All data structures expressed by a CBOR <a>representation</a> MUST be
deserialized into the <a href="#data-model">data model</a> according to the
following <a>consumption</a> rules:
The <a>DID document</a> and any DID document data structures expressed by the <a
href="#data-model">data model</a> MUST be deserialized into the <a
href="#data-model">data model</a> according to the following <a>consumption</a>
rules:
</p>

<table class="simple" id="cbor-representation-consumption">
Expand Down Expand Up @@ -4166,7 +4161,10 @@ <h2>Metadata Structure</h2>
additional formats or restrictions to that value (for example, a string
formatted as a date or as a decimal integer). It is RECOMMENDED that property
definitions use strings for values. The entire metadata structure MUST be
serializable in a conforming <a>representation</a>.
serializable according to the <a
data-cite="INFRA#serialize-an-infra-value-to-json-bytes">JSON
serialization rules</a> in the [[INFRA]] specification. Implementations MAY
serialize the metadata structure to other data formats.
</p>

<p>
Expand Down

0 comments on commit 70f1a95

Please sign in to comment.