This commit is contained in:
nlohmann committed 2026-10-27 12:14:00 +00:00
1 parent b36f8a9821
commit 11a863958e
1180 files changed
+14211 -6025

No files matched your search

+12
View File
@@ -25,6 +25,8 @@ class vector ["std::vector<uint8_t>"]
vector <|-- binary_t
```
<p class="nj-caption" markdown>Class diagram of `json::binary_t`: it derives from `std::vector<uint8_t>` and adds functions to set, clear, query, and test an optional subtype.</p>
By default, binary values are stored as `std::vector<std::uint8_t>`. This type can be changed by providing a template
parameter to the `basic_json` type. To store binary subtypes, the storage type is extended and exposed as
[`json::binary_t`](../api/basic_json/binary_t.md):
@@ -430,3 +432,13 @@ as an array of uint8 values. The library implements this translation.
"binary": [202, 254, 186, 190]
}
```
## See also
- [Binary formats](binary_formats/index.md) - the formats that can store binary values
- [`binary_t`](../api/basic_json/binary_t.md) - type for binary values
- [`byte_container_with_subtype`](../api/byte_container_with_subtype/index.md) - container for binary values with subtype
- [`binary`](../api/basic_json/binary.md) - create a binary value
- [`get_binary`](../api/basic_json/get_binary.md) - access the stored binary value
- [`is_binary`](../api/basic_json/is_binary.md) - check whether a value is binary
- [`cbor_tag_handler_t`](../api/basic_json/cbor_tag_handler_t.md) - store or ignore CBOR tags when parsing