@@ -1238,6 +1238,86 @@ <h2>Node Identifiers</h2>
12381238
12391239</ section >
12401240
1241+ < section class ="changed ">
1242+ < h2 > Uses of JSON Objects</ h2 >
1243+ < p > As a syntax, JSON has only a limited number of syntactic elements:</ p >
1244+ < ul >
1245+ < li > < a > Numbers</ a > , which describe literal numeric values,</ li >
1246+ < li > < a > Strings</ a > , which may describe literal string values, or be used as the keys in a < a > JSON object</ a > .</ li >
1247+ < li > < a > Boolean</ a > < code > true</ code > and < code > false</ code > , which describe literal boolean values,</ li >
1248+ < li > < code > Null</ code > , which describes the absense of a value,</ li >
1249+ < li > < a > Arrays</ a > , which describe an ordered set of values of any type, and</ li >
1250+ < li > < a > JSON objects</ a > , which provide a set of < a > dictionary members</ a > , relating keys with values.</ li >
1251+ </ ul >
1252+
1253+ < p > The JSON-LD data model allows for a richer set of resources, based on the RDF data model.
1254+ The data model is described more fully in < a class ="sectionRef " href ="#data-model "> </ a > .
1255+ JSON-LD uses JSON objects to describe various resources, along with the relationships
1256+ between these resources:</ p >
1257+ < dl >
1258+ < dt > < a > Node objects</ a > </ dt > < dd >
1259+ Node objects are used to define nodes in the < a > linked data graph</ a >
1260+ which may have both incoming and outgoing edges.
1261+ Node objects are principle structure for defining < a > resources</ a > having < a > properties</ a > .
1262+ See < a class ="sectionRef " href ="#node-objects "> </ a > for the normative definition.
1263+ </ dd >
1264+ < dt > < a > Value objects</ a > </ dt > < dd >
1265+ Value objects are used for describing literal nodes in a < a > linked data graph</ a >
1266+ which may have only incoming edges.
1267+ In JSON, some literal nodes may be described without the use of a < a > JSON object</ a >
1268+ (e.g., < a > numbers</ a > , < a > strings</ a > , and < a > boolean</ a > values),
1269+ but in the < a data-lt ="expansion "> expanded form</ a > ,
1270+ all literal nodes are described using < a > value objects</ a > .
1271+ See < a class ="sectionRef " href ="#describing-values "> </ a > for more information,
1272+ and < a class ="sectionRef " href ="#value-objects "> </ a > for the normative definition.
1273+ </ dd >
1274+ < dt > < a > List Objects</ a > and < a > Set objects</ a > </ dt > < dd > </ dd >
1275+ < dt > Map Objects</ dt > < dd >
1276+ JSON-LD uses various forms of < a > dictionaries</ a > as ways to more easily access values of a < a > property</ a > .
1277+ < dl >
1278+ < dt > < a > Language Maps</ a > </ dt > < dd >
1279+ Allows mulitple values differing in their associated language to be
1280+ indexed by < a > language tag</ a > .
1281+ See < a class ="sectionRef " href ="#language-indexing "> </ a > for more information,
1282+ and < a class ="sectionRef " href ="#language-maps "> </ a > for the normative definition.
1283+ </ dd >
1284+ < dt > < a > Index Maps</ a > </ dt > < dd >
1285+ Allows multiple values (< a > node objects</ a > or < a > value objects</ a > ) to be indexed by an associated < code > @index</ code > .
1286+ See < a class ="sectionRef " href ="#data-indexing "> </ a > for more information,
1287+ and < a class ="sectionRef " href ="#index-maps "> </ a > for the normative definition.
1288+ </ dd >
1289+ < dt > < a > Id Maps</ a > </ dt > < dd >
1290+ Allows multiple < a > node objects</ a > to be indexed by an associated < code > @id</ code > .
1291+ See < a class ="sectionRef " href ="#node-identifier-indexing "> </ a > for more information,
1292+ and < a class ="sectionRef " href ="#id-maps "> </ a > for the normative definition.
1293+ </ dd >
1294+ < dt > < a > Type Maps</ a > </ dt > < dd >
1295+ Allows multiple < a > node objects</ a > to be indexed by an associated < code > @type</ code > .
1296+ See < a class ="sectionRef " href ="#node-type-indexing "> </ a > for more information,
1297+ and < a class ="sectionRef " href ="#type-maps "> </ a > for the normative definition.
1298+ </ dd >
1299+ < dt > < a > Named Graph</ a > Indexing</ dt > < dd >
1300+ Allows multiple < a > named graphs</ a > to be indexed by an associated < a > graph name</ a > .
1301+ See < a class ="sectionRef " href ="#named-graph-indexing "> </ a > for more information.
1302+ </ dd >
1303+ </ dl >
1304+ </ dd >
1305+ < dt > < a > Graph objects</ a > </ dt > < dd >
1306+ A Graph object is much like a < a > node object</ a > , except that it defines a < a > named graph</ a > .
1307+ See < a class ="sectionRef " href ="#named-graphs "> </ a > for more information,
1308+ and < a class ="sectionRef " href ="#graph-objects "> </ a > for the normative definition.
1309+ </ dd >
1310+ < dt > < a > Context Definitions</ a > </ dt > < dd >
1311+ A Context Definition uses the < a > JSON object</ a > form, but is not itself data in a < a > linked data graph</ a > .
1312+ A Context Definition also may contain expanded term definitions,
1313+ which are also represented using JSON objects.
1314+ See < a class ="sectionRef " href ="#the-context "> </ a > ,
1315+ < a class ="sectionRef " href ="#advanced-context-usage "> </ a > for more information,
1316+ and < a class ="sectionRef " href ="#context-definitions "> </ a > for the normative definition.
1317+ </ dd >
1318+ </ dl >
1319+ </ section >
1320+
12411321< section class ="informative ">
12421322 < h2 > Specifying the Type</ h2 >
12431323
@@ -1250,7 +1330,7 @@ <h2>Specifying the Type</h2>
12501330 type is a < em > Person</ em > ; making this explicit with < code > @type</ code > helps
12511331 to clarify the association.</ p >
12521332
1253- < p > The type of a particular node can be specified using the < code > @type</ code >
1333+ < p > The type of a particular < a > node</ a > can be specified using the < code > @type</ code >
12541334 < a > keyword</ a > . In Linked Data, types are uniquely
12551335 identified with an < a > IRI</ a > .</ p >
12561336
@@ -1373,7 +1453,7 @@ <h2>Specifying the Type</h2>
13731453 </ pre >
13741454 </ aside >
13751455
1376- < p > The value of an < code > @type</ code > key may also be a < a > term</ a > defined in the < a > active context</ a > :</ p >
1456+ < p > The value of a < code > @type</ code > key may also be a < a > term</ a > defined in the < a > active context</ a > :</ p >
13771457
13781458 < aside class ="example ds-selector-tabs "
13791459 title ="Using a term to specify the type ">
@@ -1428,6 +1508,22 @@ <h2>Specifying the Type</h2>
14281508 </ pre >
14291509 </ aside >
14301510
1511+ < p class ="changed "> In addition to setting the type of nodes,
1512+ < code > @type</ code > can also be used to set the type of a value
1513+ to create a < a > typed value</ a > .
1514+ This use of < code > @type</ code > is similar to that used to define the type of a < a > node object</ a > ,
1515+ but value objects are restricted to having just a single type.
1516+ The use of @type to create typed values is discussed more fully in < a class ="sectionRef " href ="#typed-values "> </ a > .</ p >
1517+
1518+ < p class ="changed "> Typed values can also be defined implicitly, by specifying
1519+ @type in an expanded term definition.
1520+ This is covered more fully in < a class ="sectionRef " href ="#type-coercion "> </ a > .</ p >
1521+
1522+ < p class ="note "> The ability coerce a value using a < a > term definition</ a > is distinct
1523+ from setting one or more types on a < a > node object</ a > , as the former does not result in
1524+ new data being added to the graph, while the later manages node types
1525+ through adding additional relationships to the graph.</ p >
1526+
14311527 < p class ="note "> This section only covers the most basic features associated with
14321528 types in JSON-LD. It is worth noting that the < code > @type</ code >
14331529 < a > keyword</ a > is not only used to specify the type of a
@@ -1440,86 +1536,6 @@ <h2>Specifying the Type</h2>
14401536 < a class ="sectionRef " href ="#typed-values "> </ a > .</ p >
14411537
14421538</ section >
1443-
1444- < section class ="changed ">
1445- < h2 > Uses of JSON Objects</ h2 >
1446- < p > As a syntax, JSON has only a limited number of syntactic elements:</ p >
1447- < ul >
1448- < li > < a > Numbers</ a > , which describe literal numeric values,</ li >
1449- < li > < a > Strings</ a > , which may describe literal string values, or be used as the keys in a < a > JSON object</ a > .</ li >
1450- < li > < a > Boolean</ a > < code > true</ code > and < code > false</ code > , which describe literal boolean values,</ li >
1451- < li > < code > Null</ code > , which describes the absense of a value,</ li >
1452- < li > < a > Arrays</ a > , which describe an ordered set of values of any type, and</ li >
1453- < li > < a > JSON objects</ a > , which provide a set of < a > dictionary members</ a > , relating keys with values.</ li >
1454- </ ul >
1455-
1456- < p > The JSON-LD data model allows for a richer set of resources, based on the RDF data model.
1457- The data model is described more fully in < a class ="sectionRef " href ="#data-model "> </ a > .
1458- JSON-LD uses JSON objects to describe various resources, along with the relationships
1459- between these resources:</ p >
1460- < dl >
1461- < dt > < a > Node objects</ a > </ dt > < dd >
1462- Node objects are used to define nodes in the < a > linked data graph</ a >
1463- which may have both incoming and outgoing edges.
1464- Node objects are principle structure for defining < a > resources</ a > having < a > properties</ a > .
1465- See < a class ="sectionRef " href ="#node-objects "> </ a > for the normative definition.
1466- </ dd >
1467- < dt > < a > Value objects</ a > </ dt > < dd >
1468- Value objects are used for describing literal nodes in a < a > linked data graph</ a >
1469- which may have only incoming edges.
1470- In JSON, some literal nodes may be described without the use of a < a > JSON object</ a >
1471- (e.g., < a > numbers</ a > , < a > strings</ a > , and < a > boolean</ a > values),
1472- but in the < a data-lt ="expansion "> expanded form</ a > ,
1473- all literal nodes are described using < a > value objects</ a > .
1474- See < a class ="sectionRef " href ="#describing-values "> </ a > for more information,
1475- and < a class ="sectionRef " href ="#value-objects "> </ a > for the normative definition.
1476- </ dd >
1477- < dt > < a > List Objects</ a > and < a > Set objects</ a > </ dt > < dd > </ dd >
1478- < dt > Map Objects</ dt > < dd >
1479- JSON-LD uses various forms of < a > dictionaries</ a > as ways to more easily access values of a < a > property</ a > .
1480- < dl >
1481- < dt > < a > Language Maps</ a > </ dt > < dd >
1482- Allows mulitple values differing in their associated language to be
1483- indexed by < a > language tag</ a > .
1484- See < a class ="sectionRef " href ="#language-indexing "> </ a > for more information,
1485- and < a class ="sectionRef " href ="#language-maps "> </ a > for the normative definition.
1486- </ dd >
1487- < dt > < a > Index Maps</ a > </ dt > < dd >
1488- Allows multiple values (< a > node objects</ a > or < a > value objects</ a > ) to be indexed by an associated < code > @index</ code > .
1489- See < a class ="sectionRef " href ="#data-indexing "> </ a > for more information,
1490- and < a class ="sectionRef " href ="#index-maps "> </ a > for the normative definition.
1491- </ dd >
1492- < dt > < a > Id Maps</ a > </ dt > < dd >
1493- Allows multiple < a > node objects</ a > to be indexed by an associated < code > @id</ code > .
1494- See < a class ="sectionRef " href ="#node-identifier-indexing "> </ a > for more information,
1495- and < a class ="sectionRef " href ="#id-maps "> </ a > for the normative definition.
1496- </ dd >
1497- < dt > < a > Type Maps</ a > </ dt > < dd >
1498- Allows multiple < a > node objects</ a > to be indexed by an associated < code > @type</ code > .
1499- See < a class ="sectionRef " href ="#node-type-indexing "> </ a > for more information,
1500- and < a class ="sectionRef " href ="#type-maps "> </ a > for the normative definition.
1501- </ dd >
1502- < dt > < a > Named Graph</ a > Indexing</ dt > < dd >
1503- Allows multiple < a > named graphs</ a > to be indexed by an associated < a > graph name</ a > .
1504- See < a class ="sectionRef " href ="#named-graph-indexing "> </ a > for more information.
1505- </ dd >
1506- </ dl >
1507- </ dd >
1508- < dt > < a > Graph objects</ a > </ dt > < dd >
1509- A Graph object is much like a < a > node object</ a > , except that it defines a < a > named graph</ a > .
1510- See < a class ="sectionRef " href ="#named-graphs "> </ a > for more information,
1511- and < a class ="sectionRef " href ="#graph-objects "> </ a > for the normative definition.
1512- </ dd >
1513- < dt > < a > Context Definitions</ a > </ dt > < dd >
1514- A Context Definition uses the < a > JSON object</ a > form, but is not itself data in a < a > linked data graph</ a > .
1515- A Context Definition also may contain expanded term definitions,
1516- which are also represented using JSON objects.
1517- See < a class ="sectionRef " href ="#the-context "> </ a > ,
1518- < a class ="sectionRef " href ="#advanced-context-usage "> </ a > for more information,
1519- and < a class ="sectionRef " href ="#context-definitions "> </ a > for the normative definition.
1520- </ dd >
1521- </ dl >
1522- </ section >
15231539</ section >
15241540
15251541< section class ="normative ">
0 commit comments