nlohmann::basic_json::binary

explicitly create a binary array (with subtype)

Synopsis

Declared in <nlohmann/json.hpp>

[[nodiscard]]
static
basic_json
binary(
    binary_t::container_type&& init,
    binary_t::subtype_type subtype);

Return Value

a JSON binary value holding init with subtype subtype

NOTE

The return value should not be discarded.

Parameters

NameDescription
initcontainer with the binary data to move from
subtypesubtype to attach to the binary data