Skip to content

Commit 8aae149

Browse files
authored
release candidate 4.0.2 (#2441)
* release candidate 4.0.2 * more fixes * fixing typos * adding macro check
1 parent ef3d1ac commit 8aae149

8 files changed

Lines changed: 420 additions & 151 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14)
33
project(
44
simdjson
55
# The version number is modified by tools/release.py
6-
VERSION 4.0.1
6+
VERSION 4.0.2
77
DESCRIPTION "Parsing gigabytes of JSON per second"
88
HOMEPAGE_URL "https://simdjson.org/"
99
LANGUAGES CXX C

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = simdjson
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "4.0.1"
41+
PROJECT_NUMBER = "4.0.2"
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

include/simdjson/generic/ondemand/std_deserialize.h

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ error_code tag_invoke(deserialize_tag, auto &val, T &out) noexcept(nothrow_deser
253253
using value_type = typename std::remove_cvref_t<T>::value_type;
254254

255255
// Check if the value is null
256-
if (val.is_null()) {
256+
bool is_null_value;
257+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
258+
if (is_null_value) {
257259
out.reset(); // Set to nullopt
258260
return SUCCESS;
259261
}
@@ -361,7 +363,9 @@ error_code tag_invoke(deserialize_tag, simdjson_value &val, std::shared_ptr<T> &
361363
// Unique pointers
362364
////////////////////////////////////////
363365
error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<bool> &out) noexcept {
364-
if (val.is_null()) {
366+
bool is_null_value;
367+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
368+
if (is_null_value) {
365369
out.reset();
366370
return SUCCESS;
367371
}
@@ -374,7 +378,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<bool> &out) no
374378
}
375379

376380
error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<int64_t> &out) noexcept {
377-
if (val.is_null()) {
381+
bool is_null_value;
382+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
383+
if (is_null_value) {
378384
out.reset();
379385
return SUCCESS;
380386
}
@@ -387,7 +393,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<int64_t> &out)
387393
}
388394

389395
error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<uint64_t> &out) noexcept {
390-
if (val.is_null()) {
396+
bool is_null_value;
397+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
398+
if (is_null_value) {
391399
out.reset();
392400
return SUCCESS;
393401
}
@@ -400,7 +408,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<uint64_t> &out
400408
}
401409

402410
error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<double> &out) noexcept {
403-
if (val.is_null()) {
411+
bool is_null_value;
412+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
413+
if (is_null_value) {
404414
out.reset();
405415
return SUCCESS;
406416
}
@@ -413,7 +423,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<double> &out)
413423
}
414424

415425
error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<std::string_view> &out) noexcept {
416-
if (val.is_null()) {
426+
bool is_null_value;
427+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
428+
if (is_null_value) {
417429
out.reset();
418430
return SUCCESS;
419431
}
@@ -430,7 +442,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<std::string_vi
430442
// Shared pointers
431443
////////////////////////////////////////
432444
error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<bool> &out) noexcept {
433-
if (val.is_null()) {
445+
bool is_null_value;
446+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
447+
if (is_null_value) {
434448
out.reset();
435449
return SUCCESS;
436450
}
@@ -443,7 +457,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<bool> &out) no
443457
}
444458

445459
error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<int64_t> &out) noexcept {
446-
if (val.is_null()) {
460+
bool is_null_value;
461+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
462+
if (is_null_value) {
447463
out.reset();
448464
return SUCCESS;
449465
}
@@ -456,7 +472,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<int64_t> &out)
456472
}
457473

458474
error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<uint64_t> &out) noexcept {
459-
if (val.is_null()) {
475+
bool is_null_value;
476+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
477+
if (is_null_value) {
460478
out.reset();
461479
return SUCCESS;
462480
}
@@ -469,7 +487,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<uint64_t> &out
469487
}
470488

471489
error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<double> &out) noexcept {
472-
if (val.is_null()) {
490+
bool is_null_value;
491+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
492+
if (is_null_value) {
473493
out.reset();
474494
return SUCCESS;
475495
}
@@ -482,7 +502,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<double> &out)
482502
}
483503

484504
error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<std::string_view> &out) noexcept {
485-
if (val.is_null()) {
505+
bool is_null_value;
506+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
507+
if (is_null_value) {
486508
out.reset();
487509
return SUCCESS;
488510
}
@@ -504,7 +526,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<std::string_vi
504526
////////////////////////////////////////
505527
error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<std::string> &out) noexcept {
506528
// Check if the value is null
507-
if (val.is_null()) {
529+
bool is_null_value;
530+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
531+
if (is_null_value) {
508532
out.reset(); // Set to nullptr
509533
return SUCCESS;
510534
}
@@ -520,7 +544,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<std::string> &
520544

521545
error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<std::string> &out) noexcept {
522546
// Check if the value is null
523-
if (val.is_null()) {
547+
bool is_null_value;
548+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
549+
if (is_null_value) {
524550
out.reset(); // Set to nullptr
525551
return SUCCESS;
526552
}
@@ -536,7 +562,9 @@ error_code tag_invoke(deserialize_tag, auto &val, std::shared_ptr<std::string> &
536562

537563
error_code tag_invoke(deserialize_tag, auto &val, std::unique_ptr<int> &out) noexcept {
538564
// Check if the value is null
539-
if (val.is_null()) {
565+
bool is_null_value;
566+
SIMDJSON_TRY( val.is_null().get(is_null_value) );
567+
if (is_null_value) {
540568
out.reset(); // Set to nullptr
541569
return SUCCESS;
542570
}

include/simdjson/simdjson_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define SIMDJSON_SIMDJSON_VERSION_H
55

66
/** The version of simdjson being used (major.minor.revision) */
7-
#define SIMDJSON_VERSION "4.0.1"
7+
#define SIMDJSON_VERSION "4.0.2"
88

99
namespace simdjson {
1010
enum {
@@ -19,7 +19,7 @@ enum {
1919
/**
2020
* The revision (major.minor.REVISION) of simdjson being used.
2121
*/
22-
SIMDJSON_VERSION_REVISION = 1
22+
SIMDJSON_VERSION_REVISION = 2
2323
};
2424
} // namespace simdjson
2525

singleheader/simdjson.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2025-09-12 19:26:22 -0400. version 4.0.1 Do not edit! */
1+
/* auto-generated on 2025-09-14 09:01:41 -0600. version 4.0.2 Do not edit! */
22
/* including simdjson.cpp: */
33
/* begin file simdjson.cpp */
44
#define SIMDJSON_SRC_SIMDJSON_CPP

0 commit comments

Comments
 (0)