From 46ec41871e1936cb61144009e7fe78ec67003543 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Mon, 9 May 2022 19:43:09 +0200 Subject: [PATCH] Reorder JSON meta Use "logical" ordering for use with ordered_json. --- include/nlohmann/json.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 49188b314..fcb3a9379 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -247,9 +247,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec { basic_json result; - result["copyright"] = "(C) 2013-2022 Niels Lohmann"; result["name"] = "JSON for Modern C++"; - result["url"] = "https://github.com/nlohmann/json"; result["version"]["string"] = detail::concat(std::to_string(NLOHMANN_JSON_VERSION_MAJOR), '.', std::to_string(NLOHMANN_JSON_VERSION_MINOR), '.', @@ -257,6 +255,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec result["version"]["major"] = NLOHMANN_JSON_VERSION_MAJOR; result["version"]["minor"] = NLOHMANN_JSON_VERSION_MINOR; result["version"]["patch"] = NLOHMANN_JSON_VERSION_PATCH; + result["url"] = "https://github.com/nlohmann/json"; + result["copyright"] = "(C) 2013-2022 Niels Lohmann"; #ifdef _WIN32 result["platform"] = "win32"; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 4d86493e1..cc7d6107f 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -19258,9 +19258,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec { basic_json result; - result["copyright"] = "(C) 2013-2022 Niels Lohmann"; result["name"] = "JSON for Modern C++"; - result["url"] = "https://github.com/nlohmann/json"; result["version"]["string"] = detail::concat(std::to_string(NLOHMANN_JSON_VERSION_MAJOR), '.', std::to_string(NLOHMANN_JSON_VERSION_MINOR), '.', @@ -19268,6 +19266,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec result["version"]["major"] = NLOHMANN_JSON_VERSION_MAJOR; result["version"]["minor"] = NLOHMANN_JSON_VERSION_MINOR; result["version"]["patch"] = NLOHMANN_JSON_VERSION_PATCH; + result["url"] = "https://github.com/nlohmann/json"; + result["copyright"] = "(C) 2013-2022 Niels Lohmann"; #ifdef _WIN32 result["platform"] = "win32";