Bool
A bool
is encoded on a single byte, where 0 means false
and 1 means true
. Other values are invalid.
Floating-point types
A float32
or float64
is encoded on 4 resp. 8 bytes using the binary32 resp. binary64 formats specified by IEEE 754.
String
The size represents the number of UTF-8 bytes in the encoded representation of the string, not the number of characters in this string.