diff --git a/internal/core/src/common/Json.h b/internal/core/src/common/Json.h index 297dbcbdcca77..0570bdb56dd2c 100644 --- a/internal/core/src/common/Json.h +++ b/internal/core/src/common/Json.h @@ -133,6 +133,9 @@ class Json { value_result doc() const { + if (data_.size() == 0) { + return {}; + } thread_local simdjson::ondemand::parser parser; // it's always safe to add the padding, @@ -148,6 +151,9 @@ class Json { value_result dom_doc() const { + if (data_.size() == 0) { + return {}; + } thread_local simdjson::dom::parser parser; // it's always safe to add the padding,