Skip to content

Commit

Permalink
Mapping keys must be strings
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-scherbakov committed Aug 17, 2023
1 parent fc592d6 commit 85fa5a7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
6 changes: 6 additions & 0 deletions spec/data/json-vs-yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,9 @@ $reverse:
yaml:
prov:value: yes
prov:wasDerivedFrom: YAML#3222-anchors-and-aliases

- rdfs:label: Mapping key types
json: string
yaml:
prov:value: Any type representable in YAML, from strings to mappings
prov:wasDerivedFrom: YAML#3211-nodes
4 changes: 2 additions & 2 deletions spec/data/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ $included:
- rdfs:label: YAML features supported by YAML-LD
- rdfs:label: Encoding
- rdfs:label: Comments
- rdfs:label: Anchors and aliases
- rdfs:label: Streams
- rdfs:label: Anchors and Aliases
- rdfs:label: Mapping Key Types

- rdfs:label: Security Considerations
- rdfs:label: Interoperability Considerations
Expand Down
21 changes: 20 additions & 1 deletion spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,14 @@ <h3>JSON vs YAML comparison</h3>
<td></td>
<td><a data-cite="YAML#3222-anchors-and-aliases"></a></td>
</tr>

<tr>
<th>Mapping key types</th>
<td><code>string</code></td>
<td>
<a data-cite="YAML#3211-nodes">Any type representable in YAML</a>, from strings to mappings
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -789,6 +797,9 @@ <h2>YAML features supported by YAML-LD</h2>

<dt>YAML Streams</dt>
<dd>Not supported.</dd>

<dt>Mapping key types other than <code>string</code></dt>
<dd><a href="#mapping-key-types">Not supported.</a></dd>
</dl>

<p>
Expand Down Expand Up @@ -824,7 +835,7 @@ <h2>Comments</h2>
</section>

<section id="anchors-aliases">
<h2>Anchors and aliases</h2>
<h2>Anchors and Aliases</h2>
<p id="aa-information" data-tests="">
Since <a>anchor names</a> are a serialization detail, such anchors
MUST NOT be used to convey relevant information,
Expand Down Expand Up @@ -933,6 +944,14 @@ <h2>Anchors and aliases</h2>
-->
</pre>
</section>

<section id="mapping-key-types">
<h2>Mapping Key Types</h2>

<p id="aa-mapping-key-types" data-tests="basic-manifest.html#cir-mapping-key-1-negative">
Mapping key type MUST be a <code>string</code>. Otherwise, a processing error is raised.
</p>
</section>
</section>

<section id="sec" class="informative">
Expand Down

0 comments on commit 85fa5a7

Please sign in to comment.