json_view: exceptions name the path and the bytes of the value (#5974)

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann authored and GitHub committed 2026-11-01 17:25:26 +01:00
1 parent f022e3c59c
commit ddc34f546a
25 files changed
+1600 -696

No files matched your search

+1 -1
View File
@@ -163,7 +163,7 @@ TEST_CASE("json_view large objects")
CHECK(v[""].get_string() == "empty key");
CHECK(v["k1"].get<int>() == 1); // the first of duplicate keys, as for small objects
CHECK(!v.contains("missing"));
CHECK_THROWS_WITH_AS(v.at("missing"), "[json.exception.out_of_range.403] key 'missing' not found", json::out_of_range&);
CHECK_THROWS_WITH_AS(v.at("missing"), json_view_test::message("out_of_range.403", "", 0, text.size(), "key 'missing' not found").c_str(), json::out_of_range&);
CHECK(v == j);
CHECK(v.materialize() == j);
}