@@ -11420,13 +11420,43 @@ <h3>Serializing/Deserializing RDF</h3>
11420
11420
< a data-cite ="ECMASCRIPT#sec-strict-equality-comparison "> Strict Equality Comparison</ a >
11421
11421
defined in < a data-cite ="ECMASCRIPT#sec-strict-equality-comparison "> Section 7.2.15</ a > in [[ECMASCRIPT]].</ li >
11422
11422
< li > Otherwise, < var > A</ var > and < var > B</ var > are not equal.</ li >
11423
- </ ul >
11423
+ </ ol >
11424
11424
</ dd >
11425
11425
< dt > The lexical-to-value mapping</ dt >
11426
11426
< dd > is the result of parsing the lexical representation into
11427
11427
an internal representation consistent with [[ECMASCRIPT]] representation
11428
11428
created by using the < code > JSON.parse</ code > function as defined in
11429
11429
< a data-cite ="ECMASCRIPT#sec-json-object "> Section 24.5 The JSON Object</ a > of [[ECMASCRIPT]].</ dd >
11430
+ < dt > The canonical mapping</ dt >
11431
+ < dd > is non-normative, as a normative recommendation for
11432
+ JSON canonicalization is not yet defined. Implementations
11433
+ SHOULD use the following guidelines when creating the lexical
11434
+ representation of a < a > JSON literal</ a > :
11435
+
11436
+ < ul class ="changed ">
11437
+ < li > Serialize JSON using no unnecessary whitespace,</ li >
11438
+ < li > Keys in objects SHOULD be ordered lexicographically,</ li >
11439
+ < li > Native Numeric values SHOULD be serialized according to
11440
+ < a data-cite ="?ECMASCRIPT#sec-tostring-applied-to-the-number-type "> Section 7.1.12.1</ a > of [[?ECMASCRIPT]],</ li >
11441
+ < li > Strings SHOULD be serialized with Unicode codepoints from < code > U+0000</ code > through < code > U+001F</ code >
11442
+ using lowercase hexaddecimal Unicode notation (< code > \uhhhh</ code > ) unless in the set
11443
+ of predefined JSON control characters < code > U+0008</ code > , < code > U+0009</ code > ,
11444
+ < code > U+000A</ code > , < code > U+000C</ code > or < code > U+000D</ code >
11445
+ which SHOULD be serialized as < code > \b</ code > , < code > \t</ code > , < code > \n</ code > , < code > \f</ code > and < code > \r</ code > respectively.
11446
+ All other Unicode characters SHOULD be serialized "as is", other than
11447
+ < code > U+005C</ code > (< code > \</ code > ) and < code > U+0022</ code > (< code > "</ code > )
11448
+ which SHOULD be serialized as < code > \\</ code > and < code > \"</ code > respectively.</ li >
11449
+ </ ul >
11450
+
11451
+ < div class ="issue changed "> The JSON Canonicalization Scheme [[?JCS]]
11452
+ is an emerging standard for JSON canonicalization
11453
+ not yet ready to be referenced.
11454
+ When a JSON canonicalization standard becomes available,
11455
+ this specification will likely be updated to require such a canonical representation.
11456
+ Users are cautioned from depending on the
11457
+ < a > JSON literal</ a > lexical representation as an < a > RDF literal</ a > ,
11458
+ as the specifics of serialization may change in a future revison of this document.</ div >
11459
+ </ dd >
11430
11460
</ dl >
11431
11461
</ section >
11432
11462
</ section >
0 commit comments