JSON BinPack 0.0.1
A space-efficient open-source binary JSON serialization format based on JSON Schema with both schema-driven and schema-less support.
 
Loading...
Searching...
No Matches
sourcemeta::jsonbinpack::UTF8_STRING_NO_LENGTH Struct Reference

The encoding consist in the UTF-8 encoding of the input string. More...

Public Attributes

const std::uint64_t size
 The string UTF-8 byte-length.
 

Detailed Description

The encoding consist in the UTF-8 encoding of the input string.

Options

Option Type Description
size uint The string UTF-8 byte-length

Conditions

Condition Description
len(value) == size The input string must have the declared UTF-8 byte-length

Examples

Given the input value "foo bar" with a corresponding size of 7, the encoding results in:

+------+------+------+------+------+------+------+
| 0x66 | 0x6f | 0x6f | 0x20 | 0x62 | 0x61 | 0x72 |
+------+------+------+------+------+------+------+
f o o b a r