Merge branch 'json-view/13-view-dump' into json-view/16-view-simd

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

# Conflicts:
#	include/nlohmann/detail/view/document_data.hpp
#	single_include/nlohmann/json_view.hpp
This commit is contained in:
Niels Lohmann committed 2026-10-08 16:29:14 +02:00
commit 4f1c34e44d
39 files changed
+649 -171

No files matched your search

+4 -2
View File
@@ -1136,8 +1136,10 @@ TEST_CASE("json_view dump")
CHECK(d.root().dump() == j.dump());
CHECK(d.root().dump(-1, ' ', true) == j.dump(-1, ' ', true));
CHECK(d.root().dump(4, ' ', true) == j.dump(4, ' ', true));
const ordered_json_document keys = ordered_json_document::parse(R"({"é\n": {"\"": [], "": {}}})");
CHECK(keys.root().dump(2, ' ', true) == ordered_json::parse(R"({"é\n": {"\"": [], "": {}}})").dump(2, ' ', true));
const std::string key_text = R"({"é\n": {"\"": [], "": {}}})";
const ordered_json_document keys = ordered_json_document::parse(key_text);
const ordered_json key_json = ordered_json::parse(key_text);
CHECK(keys.root().dump(2, ' ', true) == key_json.dump(2, ' ', true));
}
SECTION("numbers")