-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jSonDocument property: sometimes null, sometimes not! #998
Comments
Hi @vaz83, The problem is that NULL is not a pointer, it is the integer I'll fix the comparison operator so that it returns Best Regards, |
As a temporary workaround, please use JsonObject::containsKey() |
Will do. I also found out other problem, i will make a new thread. Thanks! |
I have similar problem (on V6): |
Hi,
i have the following code:
`void read()
{
if (SPIFFS.begin())
{
if(SPIFFS.exists("/dev.json"))
{
File infoFile = SPIFFS.open("/dev.json", "r");
if(infoFile)
{
size_t size = infoFile.size();
std::unique_ptr<char[]> buf(new char[size]);
infoFile.readBytes(buf.get(), size);
}`
What i am facing now is that the condition if(jDoc["GUID"]!=NULL) is returning false, and when i pass jDoc["GUID"] to a string variable it has value! the property exists and has data. Why is it returning null? in another part of the code when i open other json files this condition works just fine, please help
The text was updated successfully, but these errors were encountered: