Skip to content

Commit 4c86231

Browse files
committed
changed definition of the rdf:JSON datatype
addressing #323
1 parent 597a8c4 commit 4c86231

File tree

1 file changed

+26
-42
lines changed

1 file changed

+26
-42
lines changed

index.html

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -12858,48 +12858,15 @@

Serializing/Deserializing RDF

1285812858
is the set of UNICODE [[UNICODE]] strings which conform to the JSON Grammar
1285912859
as described in Section 2 JSON Grammar of [[RFC8259]].
1286012860
The value space
12861-
is the union of the four primitive types (strings, numbers, booleans,
12862-
and null) and two structured types (objects and arrays)
12863-
from [[ECMASCRIPT]].
12864-
Two JSON values A and B are considered equal if and only if the following is true:
12865-
    12866-
  1. If A and B are both objects,
  2. 12867-
    both A and B have the same number of entries,
    12868-
    and each entry in A is equal to a corresponding entry in B
    12869-
    where
      12870-
    • the keys are equal (as defined in Section 7.2.13, step 5.a
    • 12871-
      in [[ECMASCRIPT]]), and
      12872-
    • the values are considered equal through
    • 12873-
      applying this comparison recursively.
      12874-
      12875-
    • Otherwise, if A and B are both arrays,
    • 12876-
      both A and B have the same number of elements,
      12877-
      and each element Ai is considered
      12878-
      equal to the corresponding element Bi
      12879-
      through applying this comparison recursively.
      12880-
    • Otherwise, if A and B satisfy the
    • 12881-
      12882-
      defined in Section 7.2.16 in [[ECMASCRIPT]].
      12883-
    • Otherwise, A and B are not equal.
    • 12884-
      12885-
      12886-
      The lexical-to-value mapping
      12887-
      is the result of parsing the lexical representation into
      12888-
      an internal representation consistent with [[ECMASCRIPT]] representation
      12889-
      created by using the JSON.parse function as defined in
      12890-
      Section 24.5 The JSON Object of [[ECMASCRIPT]].
      12891-
      The canonical mapping
      12892-
      is non-normative, as a normative recommendation for
      12893-
      JSON canonicalization is not yet defined. Implementations
      12894-
      SHOULD use the following guidelines when creating the lexical
      12895-
      representation of a JSON literal:
      12896-
      12897-
        12898-
      • Serialize JSON using no unnecessary whitespace,
      • 12899-
      • Keys in objects SHOULD be ordered lexicographically,
      • 12900-
      • Native Numeric values SHOULD be serialized according to
      • 12861+
        is the set of UNICODE [[UNICODE]] strings which conform to the JSON Grammar
        12862+
        as described in Section 2 JSON Grammar of [[RFC8259]],
        12863+
        and furthermore comply with the following constraints:
        12864+
          12865+
        • It MUST not contain any unnecessary whitespace,
        • 12866+
        • Keys in objects MUST be ordered lexicographically,
        • 12867+
        • Native Numeric values MUST be serialized according to
        • 1290112868
          Section 7.1.12.1 of [[?ECMASCRIPT]],
          12902-
        • Strings SHOULD be serialized with Unicode codepoints from U+0000 through U+001F
        • 12869+
        • Strings MUST be serialized with Unicode codepoints from U+0000 through U+001F
        • 1290312870
          using lower case hexadecimal Unicode notation (\uhhhh) unless in the set
          1290412871
          of predefined JSON control characters U+0008, U+0009,
          1290512872
          U+000A, U+000C or U+000D
          @@ -12908,7 +12875,6 @@

          Serializing/Deserializing RDF

          1290812875
          U+005C (\) and U+0022 (")
          1290912876
          which SHOULD be serialized as \\ and \" respectively.
          1291012877
          12911-
          1291212878
          The JSON Canonicalization Scheme [[?JCS]]
          1291312879
          is an emerging standard for JSON canonicalization
          1291412880
          not yet ready to be referenced.
          @@ -12917,7 +12883,25 @@

          Serializing/Deserializing RDF

          1291712883
          Users are cautioned from depending on the
          1291812884
          JSON literal lexical representation as an RDF literal,
          1291912885
          as the specifics of serialization may change in a future revision of this document.
          12886+
          Despite being defined as a set of strings,
          12887+
          this value space is considered distinct from the value space of `xsd:string`,
          12888+
          in order to avoid side effects with existing specifications.
          1292012889
          12890+
          The lexical-to-value mapping
          12891+
          maps any element of the lexical space to the result of
          12892+
            12893+
          1. parsing it into
          2. 12894+
            an internal representation consistent with [[ECMASCRIPT]] representation
            12895+
            created by using the JSON.parse function as defined in
            12896+
            Section 24.5 The JSON Object of [[ECMASCRIPT]],
            12897+
          3. then serializing it in the JSON format [[RFC8259]]
          4. 12898+
            in compliance with the constraints of the value space described above.
            12899+
            12900+
            12901+
            12902+
            The canonical mapping
            12903+
            maps any element of the value space to the identical string in the lexical space.
            12904+
            1292112905
            1292212906
            1292312907

            0 commit comments

            Comments
             (0)