| 7732 | */ |
| 7733 | template<typename InputType> |
| 7734 | JSON_HEDLEY_WARN_UNUSED_RESULT |
| 7735 | static basic_json from_cbor(InputType&& i, |
| 7736 | const bool strict = true, |
| 7737 | const bool allow_exceptions = true, |
| 7738 | const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) |
| 7739 | { |
| 7740 | basic_json result; |
| 7741 | detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); |
| 7742 | auto ia = detail::input_adapter(std::forward<InputType>(i)); |
| 7743 | const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); |
| 7744 | return res ? result : basic_json(value_t::discarded); |
| 7745 | } |
| 7746 | |
| 7747 | /*! |
| 7748 | @copydoc from_cbor(InputType&&, const bool, const bool, const cbor_tag_handler_t) |
nothing calls this directly
no test coverage detected