How to insert "null" value in ArduinoJSON

Just use nullptr:

arduinojson_null_example.cpp
json["myvalue"] = nullptr;

If nullptr is not available, use the equivalent (char*)0:

arduinojson_null_fallback.cpp
json["myvalue"] = (char*)0;

 


Check out similar posts by category: Arduino, Embedded