I have an JSON object like this:
{ "foo": null }
How do I check if the value of foo is a literal null
. I found the function JsonObject::isNull() but that apparently is for
testing whether the JsonObject points to an object or not
That is not what I want my code to check, but I couldn't find a solution to this problem.
According to the doc: https://arduinojson.org/v6/issues/cannot-use-null/
nullptr
), you can check if the json object's value is null or not like so:or
isNull()
method: