arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.04k stars 4.78k forks source link

Berry `math.inf`, `math.isinf()` and fixed json ouput for `inf` and `nan` #21304

Closed s-hadinger closed 5 months ago

s-hadinger commented 5 months ago

Description:

Berry anticipation of https://github.com/berry-lang/berry/pull/421

Add support for math.inf representing the normalized Infinity:

For json.dump, values inf, -inf and nan now convert to null which is the best match since inf and nan are not valid json values.

Related issue (if applicable): fixes #21296

Checklist:

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass