| 23956 | */ |
| 23957 | template<typename InputType> |
| 23958 | JSON_HEDLEY_WARN_UNUSED_RESULT |
| 23959 | static basic_json from_cbor(InputType&& i, |
| 23960 | const bool strict = true, |
| 23961 | const bool allow_exceptions = true, |
| 23962 | const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) |
| 23963 | { |
| 23964 | basic_json result; |
| 23965 | detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); |
| 23966 | auto ia = detail::input_adapter(std::forward<InputType>(i)); |
| 23967 | const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); |
| 23968 | return res ? result : basic_json(value_t::discarded); |
| 23969 | } |
| 23970 | |
| 23971 | /*! |
| 23972 | @copydoc from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) |
nothing calls this directly
no test coverage detected