diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 0212d24c6..aaa08897d 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -791,7 +791,7 @@ class binary_reader break; } default: - break; + return parse_cbor_internal(true, tag_handler); } get(); return get_cbor_binary(b) && sax->binary(b); diff --git a/test/src/unit-cbor.cpp b/test/src/unit-cbor.cpp index 1660cf945..9ab0a0db8 100644 --- a/test/src/unit-cbor.cpp +++ b/test/src/unit-cbor.cpp @@ -2572,6 +2572,9 @@ TEST_CASE("Tagged values") // check that parsing succeeds and gets original value in ignore mode auto j_tagged = json::from_cbor(v_tagged, true, true, json::cbor_tag_handler_t::ignore); CHECK(j_tagged == j); + + auto j_tagged_stored = json::from_cbor(v_tagged, true, true, json::cbor_tag_handler_t::store); + CHECK(j_tagged_stored == j); } }