@@ -21,13 +21,17 @@ Implementations processing content SHOULD NOT generate an error if they encounte
21
21
- To allow efficient storage, implementations serializing content for blobs SHOULD use a canonical serialization.
22
22
- This increases the chance that different implementations can push the same semantic content to the store without creating redundant blobs.
23
23
24
- ### JSON
24
+ ## JSON
25
25
26
- [ JSON] [ JSON ] content SHOULD be serialized as [ canonical JSON] [ canonical-json ] .
27
26
Of the [ OCI Image Format Specification media types] ( media-types.md ) , all the types ending in ` +json ` contain JSON content.
28
- Implementations :
27
+ All [ JSON ] [ JSON ] content MUST follow the I-JSON limitations in [ RFC 7493 ] [ rfc7493 ] :
29
28
30
- - [ Go] [ Go ] : [ github.com/docker/go] [ docker-go ] , which claims to implement [ canonical JSON] [ canonical-json ] except for Unicode normalization.
29
+ - The encoding MUST be [ UTF-8] [ rfc3629 ]
30
+ - Numbers SHOULD be limited to IEEE 754 double precision
31
+ - Objects MUST NOT contain duplicate names
32
+
33
+ The order of entries in JSON objects is not significant.
34
+ Implementations MAY implement Canonical JSON documented in [ RFC 8785] [ rfc8785 ] .
31
35
32
36
## EBNF
33
37
@@ -137,11 +141,11 @@ The above can be converted into the following regular expression:
137
141
[a-z]+(?:/[a-z]+)*
138
142
```
139
143
140
- [ canonical-json ] : https://wiki.laptop.org/go/Canonical_JSON
141
144
[ distribution-spec ] : https://github.com/opencontainers/distribution-spec/blob/main/spec.md
142
- [ docker-go ] : https://github.com/docker/go/
143
145
[ ebnf ] : https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form
144
- [ Go ] : https://golang.org/
145
146
[ JSON ] : https://json.org/
147
+ [ rfc3629 ] : https://datatracker.ietf.org/doc/html/rfc3629
148
+ [ rfc7493 ] : https://datatracker.ietf.org/doc/html/rfc7493
149
+ [ rfc8785 ] : https://datatracker.ietf.org/doc/html/rfc8785
146
150
[ runtime-spec ] : https://github.com/opencontainers/runtime-spec/blob/main/spec.md
147
151
[ xmlebnf ] : https://www.w3.org/TR/REC-xml/#sec-notation
0 commit comments