如何在 ArduinoJSON 中插入 null 值

只需使用 nullptr

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

如果 nullptr 不可用,使用等效的 (char*)0

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

Check out similar posts by category: Arduino, Embedded