This commit is contained in:
nlohmann
2026-10-03 05:43:12 +00:00
parent 2aaa1d24ef
commit a410b4f40f
741 changed files with 8115 additions and 2252 deletions
File diff suppressed because one or more lines are too long
+11 -2
View File
@@ -7,9 +7,9 @@ static basic_json binary(typename binary_t::container_type&& init);
// (2)
static basic_json binary(const typename binary_t::container_type& init,
std::uint8_t subtype);
typename binary_t::subtype_type subtype);
static basic_json binary(typename binary_t::container_type&& init,
std::uint8_t subtype);
typename binary_t::subtype_type subtype);
```
1. Creates a JSON binary array value from a given binary container.
@@ -70,6 +70,15 @@ Output:
type: binary, subtype: 42
```
## See also
- [binary_t](https://json.nlohmann.me/api/basic_json/binary_t/index.md) type for binary values
- [get_binary](https://json.nlohmann.me/api/basic_json/get_binary/index.md) get a reference to the stored binary value
- [is_binary](https://json.nlohmann.me/api/basic_json/is_binary/index.md) return whether the value is binary
- [byte_container_with_subtype](https://json.nlohmann.me/api/byte_container_with_subtype/index.md) container for binary values with subtype
- [Binary Values](https://json.nlohmann.me/features/binary_values/index.md) - the article on binary values
## Version history
- Added in version 3.8.0.
- Changed the type of `subtype` from `std::uint8_t` to `binary_t::subtype_type` (`std::uint64_t`) in version 3.10.0.