This commit is contained in:
nlohmann committed 2026-10-15 12:09:22 +00:00
1 parent dcc7a74a18
commit 98c9bea1d1
105 files changed
+537 -508

No files matched your search

+1 -1
View File
@@ -250,7 +250,7 @@ Note that the serialization preserves the subtype, and deserializing `v` would y
### CBOR
[CBOR](https://json.nlohmann.me/features/binary_formats/cbor/index.md) supports binary values, but no subtypes. Subtypes will be serialized as tags. Any binary value will be serialized as byte strings. The library will choose the smallest representation using the length of the byte array.
[CBOR](https://json.nlohmann.me/features/binary_formats/cbor/index.md) supports binary values and subtypes. Any binary value will be serialized as a byte string; a subtype is serialized as a tag preceding it. When parsing, tags are only read back as subtypes with `cbor_tag_handler_t::store` (see [`from_cbor`](https://json.nlohmann.me/api/basic_json/from_cbor/index.md)). The library will choose the smallest representation using the length of the byte array.
Example: serialize a binary value to CBOR