From 5ba6ea1f6f83e09262d2e66ed01ed792774d935b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 29 Sep 2026 22:47:16 +0200 Subject: [PATCH] Format the comparison examples with the pinned astyle The "check" job runs astyle over the documentation examples once it gets past the amalgamation step. Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/examples/basic_json_view__operator_eq.cpp | 6 +++--- docs/mkdocs/docs/examples/basic_json_view__operator_ne.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/mkdocs/docs/examples/basic_json_view__operator_eq.cpp b/docs/mkdocs/docs/examples/basic_json_view__operator_eq.cpp index ac59838f4..846d40fc0 100644 --- a/docs/mkdocs/docs/examples/basic_json_view__operator_eq.cpp +++ b/docs/mkdocs/docs/examples/basic_json_view__operator_eq.cpp @@ -10,9 +10,9 @@ int main() // directly as views, without ever building a nlohmann::json value for // either one const json_document previous = json_document::parse( - R"({"name": "cache", "port": 6379, "timeout": 30})"); + R"({"name": "cache", "port": 6379, "timeout": 30})"); const json_document current = json_document::parse( - R"({"port": 6379.0, "timeout": 30, "name": "cache"})"); + R"({"port": 6379.0, "timeout": 30, "name": "cache"})"); // same members, reordered, and 6379 written as a float -- operator== // treats them the same way BasicJsonType::operator== would @@ -20,7 +20,7 @@ int main() // an actually changed value is detected the same way const json_document changed = json_document::parse( - R"({"name": "cache", "port": 6380, "timeout": 30})"); + R"({"name": "cache", "port": 6380, "timeout": 30})"); std::cout << (previous.root() == changed.root()) << '\n'; // comparing a view directly against an expected json value -- handy in a diff --git a/docs/mkdocs/docs/examples/basic_json_view__operator_ne.cpp b/docs/mkdocs/docs/examples/basic_json_view__operator_ne.cpp index e284ae1a1..faa1d61cf 100644 --- a/docs/mkdocs/docs/examples/basic_json_view__operator_ne.cpp +++ b/docs/mkdocs/docs/examples/basic_json_view__operator_ne.cpp @@ -11,7 +11,7 @@ int main() // unwanted shape -- without ever materializing it into a json value just // to compare const json_document received = json_document::parse( - R"({"status": "ok", "code": 200})"); + R"({"status": "ok", "code": 200})"); const json unwanted = {{"status", "error"}, {"code", 500}}; std::cout << std::boolalpha << (received.root() != unwanted) << '\n';