diff --git a/include/nlohmann/detail/view/materialize.hpp b/include/nlohmann/detail/view/materialize.hpp index 006bdd0f3..931594219 100644 --- a/include/nlohmann/detail/view/materialize.hpp +++ b/include/nlohmann/detail/view/materialize.hpp @@ -143,6 +143,9 @@ BasicJsonType materialize(const document_data& d, const node* n) case value_t::binary: case value_t::discarded: default: + // false positive: a value in an object follows its key(), which set the + // member the parser stores it in + // @infer-ignore NULLPTR_DEREFERENCE sax.null(); break; } diff --git a/single_include/nlohmann/json_view.hpp b/single_include/nlohmann/json_view.hpp index 39dd413ec..47d28ca0c 100644 --- a/single_include/nlohmann/json_view.hpp +++ b/single_include/nlohmann/json_view.hpp @@ -7185,6 +7185,9 @@ BasicJsonType materialize(const document_data& d, const node* n) case value_t::binary: case value_t::discarded: default: + // false positive: a value in an object follows its key(), which set the + // member the parser stores it in + // @infer-ignore NULLPTR_DEREFERENCE sax.null(); break; }