Next: Strings, Previous: Primitives, Up: Encoding [Index]
128-bit binary value. It can be used as a more convenient container for 16-byte binary strings, which will be pretty printed as UUID or IPv6 address.
Application is left responsible for UUID validation.
Simplest decoder can safely replace HEXLET’s tag with 0x90 and decode it as ordinary 16-byte binary string.
Example representations:
Nil UUID | 04 00000000000000000000000000000000 |
Max UUID | 04 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
UUIDv4 0e875e3f-d385-49eb-87b4-be42d641c367 | 04 0E875E3FD38549EB87B4BE42D641C367 |
2001:db8::1234 IPv6 | 04 20010db8000000000000000000001234 |