@@ -6071,6 +6071,105 @@ <h3>Algorithm</h3>
6071
6071
and a sequence of < a > JsonLdRecords</ a > is equivalent to an < a > array</ a >
6072
6072
of < a > maps</ a > . The < a > map entries</ a > are converted to their equivalents
6073
6073
in [[INFRA]].</ p >
6074
+
6075
+ < section class ="informative ">
6076
+ < h4 > Internal Representation in Implementations</ h4 >
6077
+
6078
+ < p >
6079
+ < code > USVString</ code > , < a > JsonLdRecord</ a > , < code > sequence</ code >
6080
+ and other types defined above in WebIDL as input and output types for
6081
+ < a > JsonLdProcessor</ a > functions comprise the data structure known
6082
+ as < a > internal representation</ a > . JSON-LD algorithms are defined
6083
+ against those types.
6084
+ </ p >
6085
+
6086
+ < p >
6087
+ Each implementation would map WebIDL types to types specific to the
6088
+ programming language in use. For instance:
6089
+ </ p >
6090
+
6091
+ < table class ="simple ">
6092
+ < thead >
6093
+ < tr >
6094
+ < th > WebIDL Type</ th >
6095
+ < th > JavaScript</ th >
6096
+ < th > Python</ th >
6097
+ </ tr >
6098
+ </ thead >
6099
+ < tbody >
6100
+ < tr >
6101
+ < th > < a > UVString</ a > </ th >
6102
+ < td > < code > String</ code > </ td >
6103
+ < td > < code > str</ code > </ td >
6104
+ </ tr >
6105
+ < tr >
6106
+ < th > < a > JsonLdRecord</ a > </ th >
6107
+ < td > < code > Object</ code > </ td >
6108
+ < td > < code > dict</ code > </ td >
6109
+ </ tr >
6110
+ < tr >
6111
+ < th > < code > sequence</ code > </ th >
6112
+ < td > < code > array</ code > </ td >
6113
+ < td > < code > list</ code > </ td >
6114
+ </ tr >
6115
+ < tr >
6116
+ < td > …</ td >
6117
+ < td > …</ td >
6118
+ < td > …</ td >
6119
+ </ tr >
6120
+ </ tbody >
6121
+ </ table >
6122
+
6123
+ < p >
6124
+ The mappings used in a particular implementation are out of scope for
6125
+ this specification.
6126
+ </ p >
6127
+ </ section >
6128
+
6129
+ < section class ="informative ">
6130
+ < h4 > Serialization and Deserialization</ h4 >
6131
+
6132
+ < dl >
6133
+ < dt >
6134
+ When resolving a < a > RemoteDocument</ a > or a URL expressed as
6135
+ < code > USVString</ code > ,
6136
+ </ dt >
6137
+ < dd >
6138
+ an implementation has to deserialize a JSON-LD file into
6139
+ < a > internal representation</ a > ;
6140
+ </ dd >
6141
+
6142
+ < dt >
6143
+ To save a JSON-LD document in < a > internal representation</ a >
6144
+ to a file,
6145
+ </ dt >
6146
+ < dd >
6147
+ a user of an implementation has to serialize that data structure
6148
+ to JSON;
6149
+ </ dd >
6150
+
6151
+ < dt >
6152
+ A web service providing Linked Data as JSON-LD and supporting content negotiation
6153
+ </ dt >
6154
+ < dd >
6155
+ has to take HTTP headers in account to choose the serialization format
6156
+ and its parameters to serve the client appropriately.
6157
+ </ dd >
6158
+ </ dl >
6159
+
6160
+ < p >
6161
+ There are many other use cases where an implementation, and/or a system
6162
+ based on one, has to perform serialization and deserialization of
6163
+ JSON-LD documents expressed in < a > internal representation</ a > to and
6164
+ from JSON character streams.
6165
+ </ p >
6166
+
6167
+ < p >
6168
+ Such serialization and deserialization procedures are dependent on the
6169
+ programming language, platform, and libraries in use, and are out of
6170
+ scope for this specification.
6171
+ </ p >
6172
+ </ section >
6074
6173
</ section >
6075
6174
6076
6175
< section > < h3 > RDF Dataset Interfaces</ h3 >
0 commit comments