From a27065bd12c689aa4edbb9ac7592206aafc4cd55 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 11 Jul 2026 23:45:46 +0200 Subject: [PATCH] Regenerate api_surface.json after merging develop develop gained iterator+sentinel support for accept()/parse()/sax_parse()/ from_cbor()/from_msgpack()/from_ubjson()/from_bjdata()/from_bson() (#5205) since this branch was created, which check_api_docs.yml's drift check caught immediately: GitHub's pull_request trigger checks out the PR-vs-base merge commit, not the PR branch in isolation, so CI was comparing the committed api_surface.json (generated before that upstream change existed) against a fresh extraction of a json.hpp that already had it. This superseded an earlier, incorrect diagnosis of the same symptom (a JSON_HAS_RANGES cross-environment pin) -- that fix remains in place since it's still a real, independent determinism improvement for three other JSON_HAS_RANGES-gated locations in type_traits.hpp, but it wasn't the actual cause of this particular mismatch: these new overloads turned out to be unconditional (SFINAE-gated via can_compare_ne, not preprocessor-gated), so no environment-detection difference was involved here at all. Signed-off-by: Niels Lohmann Co-Authored-By: Claude Sonnet 5 Signed-off-by: Niels Lohmann --- tools/api_checker/api_surface.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/api_checker/api_surface.json b/tools/api_checker/api_surface.json index 0b35337f3..902aacfb6 100644 --- a/tools/api_checker/api_surface.json +++ b/tools/api_checker/api_surface.json @@ -190,7 +190,7 @@ "name": "accept", "pretty_signature": "nlohmann::basic_json::accept", "scope": "nlohmann::basic_json", - "signature": "template static bool accept(IteratorType first, IteratorType last, const bool ignore_comments = false, const bool ignore_trailing_commas = false)", + "signature": "template::value, int> = 0> static bool accept(IteratorType first, SentinelType last, const bool ignore_comments = false, const bool ignore_trailing_commas = false)", "tier": "callable" }, { @@ -847,7 +847,7 @@ "name": "from_bjdata", "pretty_signature": "nlohmann::basic_json::from_bjdata", "scope": "nlohmann::basic_json", - "signature": "template JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_bjdata(IteratorType first, IteratorType last, const bool strict = true, const bool allow_exceptions = true)", + "signature": "template::value, int> = 0> JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_bjdata(IteratorType first, SentinelType last, const bool strict = true, const bool allow_exceptions = true)", "tier": "callable" }, { @@ -874,7 +874,7 @@ "name": "from_bson", "pretty_signature": "nlohmann::basic_json::from_bson", "scope": "nlohmann::basic_json", - "signature": "template JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_bson(IteratorType first, IteratorType last, const bool strict = true, const bool allow_exceptions = true)", + "signature": "template::value, int> = 0> JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_bson(IteratorType first, SentinelType last, const bool strict = true, const bool allow_exceptions = true)", "tier": "callable" }, { @@ -910,7 +910,7 @@ "name": "from_cbor", "pretty_signature": "nlohmann::basic_json::from_cbor", "scope": "nlohmann::basic_json", - "signature": "template JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_cbor(IteratorType first, IteratorType last, const bool strict = true, const bool allow_exceptions = true, const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)", + "signature": "template::value, int> = 0> JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_cbor(IteratorType first, SentinelType last, const bool strict = true, const bool allow_exceptions = true, const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)", "tier": "callable" }, { @@ -946,7 +946,7 @@ "name": "from_msgpack", "pretty_signature": "nlohmann::basic_json::from_msgpack", "scope": "nlohmann::basic_json", - "signature": "template JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_msgpack(IteratorType first, IteratorType last, const bool strict = true, const bool allow_exceptions = true)", + "signature": "template::value, int> = 0> JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_msgpack(IteratorType first, SentinelType last, const bool strict = true, const bool allow_exceptions = true)", "tier": "callable" }, { @@ -982,7 +982,7 @@ "name": "from_ubjson", "pretty_signature": "nlohmann::basic_json::from_ubjson", "scope": "nlohmann::basic_json", - "signature": "template JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_ubjson(IteratorType first, IteratorType last, const bool strict = true, const bool allow_exceptions = true)", + "signature": "template::value, int> = 0> JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json from_ubjson(IteratorType first, SentinelType last, const bool strict = true, const bool allow_exceptions = true)", "tier": "callable" }, { @@ -1684,7 +1684,7 @@ "name": "parse", "pretty_signature": "nlohmann::basic_json::parse", "scope": "nlohmann::basic_json", - "signature": "template JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(IteratorType first, IteratorType last, parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false, const bool ignore_trailing_commas = false)", + "signature": "template::value, int> = 0> JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(IteratorType first, SentinelType last, parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false, const bool ignore_trailing_commas = false)", "tier": "callable" }, { @@ -1855,7 +1855,7 @@ "name": "sax_parse", "pretty_signature": "nlohmann::basic_json::sax_parse", "scope": "nlohmann::basic_json", - "signature": "template JSON_HEDLEY_NON_NULL(3) static bool sax_parse(IteratorType first, IteratorType last, SAX* sax, input_format_t format = input_format_t::json, const bool strict = true, const bool ignore_comments = false, const bool ignore_trailing_commas = false)", + "signature": "template::value, int> = 0> JSON_HEDLEY_NON_NULL(3) static bool sax_parse(IteratorType first, SentinelType last, SAX* sax, input_format_t format = input_format_t::json, const bool strict = true, const bool ignore_comments = false, const bool ignore_trailing_commas = false)", "tier": "callable" }, {