After update to termux-api v51 termux-battery-status output JSON changed float format and replace dot to comma as delimiter for temperature field (maybe other). So previous parsers cannot work with such JSON. It is also common to use a dot in floating point numbers.
Previous:
{
"health": "GOOD",
"percentage": 47,
"plugged": "UNPLUGGED",
"status": "DISCHARGING",
"temperature": 27.100000381469727,
"current": -60700
}
Current:
{
"present": true,
"technology": "Li-ion",
"health": "GOOD",
"plugged": "UNPLUGGED",
"status": "DISCHARGING",
"temperature": "27,4",
"voltage": 3996,
"current": -285300,
"current_average": -267900,
"percentage": 77,
"level": 77,
"scale": 100,
"charge_counter": 2268420,
"energy": null
}
Steps to reproduce
- Run
termux-battery-status
Expected behavior
Dot as delimiter for floats in json output.
Additional information
- termux-api application version: 0.51.0 (f-droid)
- termux-api package version (installed through apt): 0.59.1
- Android OS version: 13
- Device model: F+ R570E
After update to termux-api v51
termux-battery-statusoutput JSON changed float format and replace dot to comma as delimiter for temperature field (maybe other). So previous parsers cannot work with such JSON. It is also common to use a dot in floating point numbers.Previous:
Current:
Steps to reproduce
termux-battery-statusExpected behavior
Dot as delimiter for floats in json output.
Additional information