mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-04-21 22:27:35 -04:00
The encoding/json package marshals []byte to a JSON string containing the base64 encoding of the input slice's bytes, and unmarshals JSON strings to []byte by assuming the JSON string contains a valid base64 text. As a binary format, CBOR is capable of representing arbitrary byte sequences without converting them to a text encoding, but it also needs to interoperate with the existing JSON serializer. It does this using the "expected later encoding" tags defined in RFC 8949, which indicate a specific text encoding to be used when interoperating with text-based protocols. The actual conversion to or from a text encoding is deferred until necessary, so no conversion is performed during roundtrips of []byte to CBOR. |
||
|---|---|---|
| .. | ||
| compat | ||
| applyconfiguration_test.go | ||
| backward_compatibility_test.go | ||
| conversion.go | ||
| conversion_test.go | ||
| copy_test.go | ||
| deep_copy_test.go | ||
| defaulting_test.go | ||
| doc.go | ||
| fuzzer.go | ||
| install.go | ||
| meta_test.go | ||
| node_example.json | ||
| OWNERS | ||
| replication_controller_example.json | ||
| serialization_proto_test.go | ||
| serialization_test.go | ||
| unstructured_test.go | ||