Merge pull request #4550 from akohlmey/collected-small-fixes

Collected small changes and fixes
This commit is contained in:
Axel Kohlmeyer
2025-04-25 13:46:59 -04:00
committed by GitHub
18 changed files with 1961 additions and 1059 deletions

View File

@ -48,7 +48,11 @@ TEST(JSON, serialize_deserialize)
j1["nothing"] = nullptr;
std::string expected = "{\"happy\":true,\"name\":\"Niels\",\"nothing\":null,\"pi\":3.141}";
std::string dumped = j1.dump();
std::string dumped = j1.dump(-1);
ASSERT_THAT(expected, Eq(dumped));
expected = "{\n \"happy\": true,\n \"name\": \"Niels\",\n \"nothing\": null,\n \"pi\": 3.141\n}";
dumped = j1.dump(2, ' ');
ASSERT_THAT(expected, Eq(dumped));
json j2 = json::parse(expected);