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

Add Metadata section based on infra data structures. #347

Merged
merged 3 commits into from
Jul 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
67 changes: 67 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3456,6 +3456,73 @@ <h2>
<h2>
Metadata Structure
</h2>

<p>
Input and output metadata is often involved during the <a>DID Resolution</a>,
<a>DID URL Dereferencing</a>, and other DID-related processes. The structure
used to communicate this metadata MUST be a <a data-cite="INFRA#maps">map</a> of
properties. Each property name MUST be a <a data-cite="INFRA#string">string</a>.
Each property value MUST be a <a data-cite="INFRA#string">string</a>,
<a data-cite="INFRA#maps">map</a>, <a data-cite="INFRA#lists">list</a>,
<a data-cite="INFRA#boolean">boolean</a>, or <a data-cite="INFRA#null">null</a>.
The values within any complex data structures such as maps and lists
MUST be one of these data types as well.
All metadata property definitions MUST define the value type, including any 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 where possible.
</p>

<p>
All implementations of functions that use metadata structures as either input or output MUST
be able to fully represent all data types described here in a deterministic fashion. As inputs and
outputs using metadata structures are defined in terms of data types and not their serialization,
the method for representation is internal to the implementation of the function and is out of
scope of this specification.
</p>

<p>
The following example demonstrates a JSON-encoded metadata structure represented
within a <a href="#did-resolution">DID Resolution process</a>.
</p>

<pre class="example" title="JSON-encoded DID resolution input metadata example">
{
"accept": "application/did+ld+json"
}
</pre>

<p>
This example corresponds to a metadata structure of the following format:
</p>

<pre class="example" title="DID resolution input metadata example">
«[
"accept" → "application/did+ld+json"
</pre>

<p>
The next example demonstrates a JSON-encoded metadata structure that might be
used in the return of a <a href="#did-resolution">DID Resolution process</a> if a
DID was not found.
</p>

<pre class="example" title="JSON-encoded DID resolution output metadata example">
{
"error": "not-found"
}
</pre>

<p>
This example corresponds to a metadata structure of the following format:
</p>

<pre class="example" title="DID resolution output metadata example">
«[
"error" → "not-found"
</pre>

</section>

</section>
Expand Down