Skip to content

Commit

Permalink
Reintroduce the use rdf:type flag
Browse files Browse the repository at this point in the history
This addresses #91.
  • Loading branch information
lanthaler committed Oct 2, 2013
1 parent f12cfd7 commit d6358f2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions spec/latest/json-ld-api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3464,14 +3464,18 @@ <h3>Overview</h3>
<tref>false</tref> based on their
<tref href="http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form">lexical form</tref>
as described in
<a class="sectionRef" href="#data-round-tripping">Data Round Tripping</a>.</p>
<a class="sectionRef" href="#data-round-tripping">Data Round Tripping</a>.
Unless the <i>use <code>rdf:type</code></i> 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 <tref>IRI</tref> or <tref>blank node identifier</tref>.</p>
</section>

<section>
<h2>Algorithm</h2>

<p>The algorithm takes two required inputs: an <tref>RDF dataset</tref> and a flag
<i>use native types</i> that defaults to <tref>false</tref>.</p>
<p>The algorithm takes one required and two optional inputs: an <tref>RDF dataset</tref>
and the two flags <i>use native types</i> and <i>use <code>rdf:type</code></i>
that both default to <tref>false</tref>.</p>

<ol class="algorithm">
<li>Initialize <i>default graph</i> to an empty <tref>JSON object</tref>.</li>
Expand Down Expand Up @@ -3506,7 +3510,8 @@ <h2>Algorithm</h2>
create one and initialize its value to a new <tref>JSON object</tref>
consisting of a single member <code>@id</code> whose value is
set to <i>object</i>.</li>
<li>If <i>predicate</i> equals <code>rdf:type</code>, and <i>object</i>
<li>If <i>predicate</i> equals <code>rdf:type</code>, the
<i>use <code>rdf:type</code></i> flag is not <tref>true</tref>, and <i>object</i>
is an <tref>IRI</tref> or <tref>blank node identifier</tref>,
append <i>object</i> to the value of the <code>@type</code>
member of <i>node</i>; unless such an item already exists.
Expand Down

0 comments on commit d6358f2

Please sign in to comment.