Skip to content

Commit

Permalink
Reformat Serialize RDF as JSON-LD Algorithm section a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-scherbakov committed Nov 12, 2024
1 parent 5fb21fa commit 52a47a4
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5156,17 +5156,30 @@ <h3>Overview</h3>
and generating a JSON-LD document in expanded form for all
<a>RDF literals</a>, <a>IRIs</a>
and <a>blank node identifiers</a>.

If the <a data-link-for="JsonLdOptions">useNativeTypes</a> flag is set to <code>true</code>,
<a>RDF literals</a> with a
<a>datatype IRI</a>
that equals <code>xsd:integer</code> or <code>xsd:double</code> are converted
to a <a>JSON numbers</a> and <a>RDF literals</a>
that equals

<ul>
<li>
<code>xsd:integer</code> or <code>xsd:double</code> are converted
to <a>JSON numbers</a>,
</li>
<li>and <a>RDF literals</a>
with a <a>datatype IRI</a>
that equals <code>xsd:boolean</code> are converted to <code>true</code> or
<code>false</code> based on their
<code>false</code>,</li>
</ul>

based on their
<a>lexical form</a>
as described in
<a class="sectionRef" href="#data-round-tripping"></a>.



Unless the <a data-link-for="JsonLdOptions">useRdfType</a> flag is set to true, <code>rdf:type</code>
predicates will be serialized as <code>@type</code> as long as the associated object is
either an <a>IRI</a> or <a>blank node identifier</a>.</p>
Expand Down

0 comments on commit 52a47a4

Please sign in to comment.