mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Added ARDUINOJSON_ENABLE_NAN to enable NaN in JSON (closes #973)
This commit is contained in:
@@ -52,7 +52,7 @@ class TextFormatter {
|
||||
|
||||
template <typename T>
|
||||
void writeFloat(T value) {
|
||||
if (isnan(value)) return writeRaw("NaN");
|
||||
if (isnan(value)) return writeRaw(ARDUINOJSON_ENABLE_NAN ? "NaN" : "null");
|
||||
|
||||
if (value < 0.0) {
|
||||
writeRaw('-');
|
||||
|
||||
Reference in New Issue
Block a user