! @brief create a UBJSON serialization of a given JSON value Serializes a given JSON value @a j to a byte vector using the UBJSON (Universal Binary JSON) serialization format. UBJSON aims to be more compact than JSON itself, yet more efficient to parse. The library uses the following mapping from JSON values types to UBJSON types according to the UBJSON specification:
| 21309 | @since version 3.1.0 |
| 21310 | */ |
| 21311 | static std::vector<uint8_t> to_ubjson(const basic_json& j, |
| 21312 | const bool use_size = false, |
| 21313 | const bool use_type = false) |
| 21314 | { |
| 21315 | std::vector<uint8_t> result; |
| 21316 | to_ubjson(j, result, use_size, use_type); |
| 21317 | return result; |
| 21318 | } |
| 21319 | |
| 21320 | static void to_ubjson(const basic_json& j, detail::output_adapter<uint8_t> o, |
| 21321 | const bool use_size = false, const bool use_type = false) |
nothing calls this directly
no test coverage detected