The encoding consists of each pair encoded as the key followed by the value according to key_encoding
and encoding
. The order in which pairs are encoded is undefined.
More...
Public Attributes | |
const std::uint64_t | size |
The object size. | |
const std::shared_ptr< Encoding > | key_encoding |
Key encoding. | |
const std::shared_ptr< Encoding > | encoding |
Value encoding. | |
The encoding consists of each pair encoded as the key followed by the value according to key_encoding
and encoding
. The order in which pairs are encoded is undefined.
Option | Type | Description |
---|---|---|
size | uint | The object size |
keyEncoding | encoding | Key encoding |
encoding | encoding | Value encoding |
Condition | Description |
---|---|
len(value) == size | The input object must have the declared amount of entries |
Given the array { "foo": 1, "bar": 2 }
where keyEncoding
corresponds to UTF8_STRING_NO_LENGTH (size 3) and encoding
corresponds to BOUNDED_MULTIPLE_8BITS_ENUM_FIXED (minimum 0, maximum 10, multiplier 1), the encoding results in:
Or: