diff --git a/CMakeLists.txt b/CMakeLists.txt index 496116807..c8c027c7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14) project( simdjson # The version number is modified by tools/release.py - VERSION 4.0.1 + VERSION 4.0.2 DESCRIPTION "Parsing gigabytes of JSON per second" HOMEPAGE_URL "https://simdjson.org/" LANGUAGES CXX C diff --git a/Doxyfile b/Doxyfile index f071e00b6..02ffbef4a 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = simdjson # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "4.0.1" +PROJECT_NUMBER = "4.0.2" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/include/simdjson/generic/ondemand/std_deserialize.h b/include/simdjson/generic/ondemand/std_deserialize.h index 96720ff59..c621a6247 100644 --- a/include/simdjson/generic/ondemand/std_deserialize.h +++ b/include/simdjson/generic/ondemand/std_deserialize.h @@ -253,7 +253,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -361,7 +363,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -374,7 +378,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -387,7 +393,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -400,7 +408,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -413,7 +423,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -430,7 +442,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -443,7 +457,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -456,7 +472,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -469,7 +487,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -482,7 +502,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -504,7 +526,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -520,7 +544,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -536,7 +562,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } diff --git a/include/simdjson/simdjson_version.h b/include/simdjson/simdjson_version.h index 900cc482d..4b6004b5f 100644 --- a/include/simdjson/simdjson_version.h +++ b/include/simdjson/simdjson_version.h @@ -4,7 +4,7 @@ #define SIMDJSON_SIMDJSON_VERSION_H /** The version of simdjson being used (major.minor.revision) */ -#define SIMDJSON_VERSION "4.0.1" +#define SIMDJSON_VERSION "4.0.2" namespace simdjson { enum { @@ -19,7 +19,7 @@ enum { /** * The revision (major.minor.REVISION) of simdjson being used. */ - SIMDJSON_VERSION_REVISION = 1 + SIMDJSON_VERSION_REVISION = 2 }; } // namespace simdjson diff --git a/singleheader/simdjson.cpp b/singleheader/simdjson.cpp index 4e51509bb..d1fc6b9b8 100644 --- a/singleheader/simdjson.cpp +++ b/singleheader/simdjson.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2025-09-12 19:26:22 -0400. version 4.0.1 Do not edit! */ +/* auto-generated on 2025-09-14 09:01:41 -0600. version 4.0.2 Do not edit! */ /* including simdjson.cpp: */ /* begin file simdjson.cpp */ #define SIMDJSON_SRC_SIMDJSON_CPP diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index 16a24068d..bf27830da 100644 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1,4 +1,4 @@ -/* auto-generated on 2025-09-12 19:26:22 -0400. version 4.0.1 Do not edit! */ +/* auto-generated on 2025-09-14 09:01:41 -0600. version 4.0.2 Do not edit! */ /* including simdjson.h: */ /* begin file simdjson.h */ #ifndef SIMDJSON_H @@ -2508,7 +2508,7 @@ namespace std { #define SIMDJSON_SIMDJSON_VERSION_H /** The version of simdjson being used (major.minor.revision) */ -#define SIMDJSON_VERSION "4.0.1" +#define SIMDJSON_VERSION "4.0.2" namespace simdjson { enum { @@ -2523,7 +2523,7 @@ enum { /** * The revision (major.minor.REVISION) of simdjson being used. */ - SIMDJSON_VERSION_REVISION = 1 + SIMDJSON_VERSION_REVISION = 2 }; } // namespace simdjson @@ -34086,7 +34086,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -38931,7 +38933,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -39039,7 +39043,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39052,7 +39058,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39065,7 +39073,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39078,7 +39088,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39091,7 +39103,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39108,7 +39122,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39121,7 +39137,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39134,7 +39152,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39147,7 +39167,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39160,7 +39182,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -39182,7 +39206,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -39198,7 +39224,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -39214,7 +39242,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -45703,7 +45733,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include @@ -47015,7 +47045,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -51860,7 +51892,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -51968,7 +52002,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -51981,7 +52017,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -51994,7 +52032,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52007,7 +52047,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52020,7 +52062,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52037,7 +52081,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52050,7 +52096,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52063,7 +52111,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52076,7 +52126,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52089,7 +52141,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -52111,7 +52165,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -52127,7 +52183,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -52143,7 +52201,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -58632,7 +58692,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include @@ -60443,7 +60503,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -65288,7 +65350,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -65396,7 +65460,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65409,7 +65475,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65422,7 +65490,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65435,7 +65505,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65448,7 +65520,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65465,7 +65539,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65478,7 +65554,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65491,7 +65569,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65504,7 +65584,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65517,7 +65599,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -65539,7 +65623,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -65555,7 +65641,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -65571,7 +65659,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -72060,7 +72150,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include @@ -73871,7 +73961,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -78716,7 +78808,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -78824,7 +78918,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78837,7 +78933,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78850,7 +78948,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78863,7 +78963,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78876,7 +78978,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78893,7 +78997,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78906,7 +79012,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78919,7 +79027,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78932,7 +79042,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78945,7 +79057,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -78967,7 +79081,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -78983,7 +79099,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -78999,7 +79117,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -85488,7 +85608,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include @@ -87414,7 +87534,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -92259,7 +92381,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -92367,7 +92491,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92380,7 +92506,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92393,7 +92521,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92406,7 +92536,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92419,7 +92551,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92436,7 +92570,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92449,7 +92585,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92462,7 +92600,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92475,7 +92615,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92488,7 +92630,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -92510,7 +92654,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -92526,7 +92672,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -92542,7 +92690,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -99031,7 +99181,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include @@ -101273,7 +101423,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -106118,7 +106270,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -106226,7 +106380,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106239,7 +106395,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106252,7 +106410,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106265,7 +106425,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106278,7 +106440,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106295,7 +106459,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106308,7 +106474,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106321,7 +106489,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106334,7 +106504,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106347,7 +106519,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -106369,7 +106543,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -106385,7 +106561,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -106401,7 +106579,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -112890,7 +113070,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include @@ -114609,7 +114789,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -119454,7 +119636,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -119562,7 +119746,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119575,7 +119761,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119588,7 +119776,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119601,7 +119791,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119614,7 +119806,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119631,7 +119825,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119644,7 +119840,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119657,7 +119855,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119670,7 +119870,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119683,7 +119885,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -119705,7 +119909,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -119721,7 +119927,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -119737,7 +119945,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -126226,7 +126436,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include @@ -127958,7 +128168,9 @@ public: using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (is_null()) { + bool is_null_value; + SIMDJSON_TRY( is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -132803,7 +133015,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser using value_type = typename std::remove_cvref_t::value_type; // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullopt return SUCCESS; } @@ -132911,7 +133125,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr & // Unique pointers //////////////////////////////////////// error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -132924,7 +133140,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -132937,7 +133155,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -132950,7 +133170,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -132963,7 +133185,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -132980,7 +133204,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -132993,7 +133219,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) no } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -133006,7 +133234,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -133019,7 +133249,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -133032,7 +133264,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) } error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); return SUCCESS; } @@ -133054,7 +133288,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -133070,7 +133306,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -133086,7 +133324,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr & error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr &out) noexcept { // Check if the value is null - if (val.is_null()) { + bool is_null_value; + SIMDJSON_TRY( val.is_null().get(is_null_value) ); + if (is_null_value) { out.reset(); // Set to nullptr return SUCCESS; } @@ -139575,7 +139815,7 @@ simdjson_inline void string_builder::append_key_value(key_type key, value_type v #include #include -#include +#include #include #include #include diff --git a/singleheader/singleheader.zip b/singleheader/singleheader.zip index 6acc67467..e2bbc04ec 100644 Binary files a/singleheader/singleheader.zip and b/singleheader/singleheader.zip differ diff --git a/tests/dom/ranges_test.cpp b/tests/dom/ranges_test.cpp index 73bec2cd4..18298d6a3 100644 --- a/tests/dom/ranges_test.cpp +++ b/tests/dom/ranges_test.cpp @@ -8,7 +8,7 @@ using namespace simdjson; namespace ranges_test { - +#if SIMDJSON_EXCEPTIONS bool printout() { TEST_START(); auto cars_json = R"( [ @@ -43,6 +43,7 @@ namespace ranges_test { ASSERT_TRUE(std::ranges::equal(cars, expected)); TEST_SUCCEED(); } + #endif // SIMDJSON_EXCEPTIONS bool run() { return