Skip to content

Commit b4c8621

Browse files
pchampingkellogg
authored andcommitted
address #387
1 parent d254f3e commit b4c8621

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13192,7 +13192,7 @@ <h4>Conversion of native data types</h4>
1319213192
<p>In JSON-LD numbers and boolean values are native data types. While [[Turtle]]
1319313193
has a shorthand syntax to express such values, RDF's abstract syntax requires
1319413194
that numbers and boolean values are represented as typed literals. Thus,
13195-
to allow full round-tripping, the JSON-LD 1.1 Processing Algorithms and API specification [[JSON-LD11-API]]
13195+
to allow round-tripping, <a data-cite="JSON-LD11-API#data-round-tripping">Section 8.6</a> of the the JSON-LD 1.1 Processing Algorithms and API specification [[JSON-LD11-API]]
1319613196
defines conversion rules between JSON-LD's native data types and RDF's
1319713197
counterparts. <a>Numbers</a> without fractions are
1319813198
converted to <code>xsd:integer</code>-typed literals, numbers with fractions
@@ -13236,6 +13236,12 @@ <h4>Conversion of native data types</h4>
1323613236
so `xsd:double` is the most appropriate datatype to render them back in RDF.
1323713237
</div>
1323813238

13239+
<div id="issue387" class="note changed">Native JSON numbers are sometimes converted to `xsd:double`
13240+
(numbers with a fractional part, or very big integers)
13241+
and this conversion can be lossy.
13242+
Therefore, the use of native JSON numbers is discouraged when the exact value of the numbers must be preserved. It is advised to use instead <a>value objects</a> with the appropriate datatype.
13243+
</div>
13244+
1323913245
</section>
1324013246

1324113247
<section>

0 commit comments

Comments
 (0)