Skip to content

Commit e49a10f

Browse files
[#83]: Add Node Identifier Value Types section
1 parent 1e53801 commit e49a10f

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

index.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,48 @@ <h2>Mapping Key Types</h2>
10321032
Mapping key type MUST be a <code>string</code>. Otherwise, a processing error is raised.
10331033
</p>
10341034
</section>
1035+
1036+
<section id="scalar-value-types">
1037+
<h2>Scalar Value Types</h2>
1038+
1039+
<p>
1040+
YAML-LD supports only the data types that [[JSON]] supports: <a>string</a>,
1041+
<a>number</a>, <a>boolean</a>, <a>null</a>, and the composite types <a>array</a>
1042+
and <a>object</a>.
1043+
The <a data-cite="YAML#core-schema">YAML Core Schema</a> may recognize additional
1044+
scalar types, such as date (e.g. unquoted <code>2018-04-01</code>).
1045+
Such YAML-native types are not supported.
1046+
Documents containing scalar values that are not one of the supported JSON types
1047+
MAY cause <a data-cite="JSON-LD11-API#dom-jsonlderrorcode-loading-document-failed">loading-document-failed</a>
1048+
error.
1049+
Authors SHOULD use quoted strings for date-like values (e.g. <code>"2018-04-01"</code>)
1050+
to ensure they are parsed as strings.
1051+
</p>
1052+
</section>
1053+
1054+
<section id="node-identifier-value-types">
1055+
<h2>Node Identifier Value Types</h2>
1056+
1057+
<p id="aa-id-value-type" data-tests="
1058+
manifest.html#id-type-date-negative,
1059+
manifest.html#id-type-int-negative,
1060+
manifest.html#id-type-bool-true-negative,
1061+
manifest.html#id-type-float-negative,
1062+
manifest.html#id-type-bool-false-negative,
1063+
manifest.html#id-type-bool-yes-negative,
1064+
manifest.html#id-type-bool-no-negative,
1065+
manifest.html#id-type-bool-on-negative,
1066+
manifest.html#id-type-bool-off-negative">
1067+
Values of <code>@id</code> and of properties with <code>@type: "@id"</code> in context
1068+
MUST be <a>strings</a> for IRI resolution.
1069+
The <a data-cite="YAML#core-schema">YAML Core Schema</a> may recognize values such as
1070+
<code>true</code>, <code>42</code>, <code>3.14</code>, and <code>2018-04-01</code>
1071+
as boolean, integer, float, or date.
1072+
Documents with non-string values in those positions cause a
1073+
<a data-cite="JSON-LD11-API#dom-jsonlderrorcode-loading-document-failed">loading-document-failed</a>
1074+
error.
1075+
</p>
1076+
</section>
10351077
</section>
10361078

10371079
<section id="sec" class="informative">

0 commit comments

Comments
 (0)