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

address #387 #395

Merged
merged 2 commits into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13192,7 +13192,7 @@ <h4>Conversion of native data types</h4>
<p>In JSON-LD numbers and boolean values are native data types. While [[Turtle]]
has a shorthand syntax to express such values, RDF's abstract syntax requires
that numbers and boolean values are represented as typed literals. Thus,
to allow full round-tripping, the JSON-LD 1.1 Processing Algorithms and API specification [[JSON-LD11-API]]
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]]
defines conversion rules between JSON-LD's native data types and RDF's
counterparts. <a>Numbers</a> without fractions are
converted to <code>xsd:integer</code>-typed literals, numbers with fractions
Expand Down Expand Up @@ -13236,6 +13236,12 @@ <h4>Conversion of native data types</h4>
so `xsd:double` is the most appropriate datatype to render them back in RDF.
</div>

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

</section>

<section>
Expand Down