| 23504 | /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/ |
| 23505 | template<typename InputType> |
| 23506 | JSON_HEDLEY_WARN_UNUSED_RESULT |
| 23507 | static basic_json from_cbor(InputType&& i, |
| 23508 | const bool strict = true, |
| 23509 | const bool allow_exceptions = true, |
| 23510 | const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) |
| 23511 | { |
| 23512 | basic_json result; |
| 23513 | detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); |
| 23514 | auto ia = detail::input_adapter(std::forward<InputType>(i)); |
| 23515 | const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); |
| 23516 | return res ? result : basic_json(value_t::discarded); |
| 23517 | } |
| 23518 | |
| 23519 | /// @brief create a JSON value from an input in CBOR format |
| 23520 | /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/ |
nothing calls this directly
no test coverage detected