Replies: 5 comments
-
Do you actually need to control the number of digits or are you looking for the shortest (but correct) representation? @ColinH Would an update of the conversion libraries help to improve the current overlong representations? |
Beta Was this translation helpful? Give feedback.
-
I would prefer something like %0.2f in printf :D |
Beta Was this translation helpful? Give feedback.
-
@xhpohanka This is not currently possible, but should be easy to add given the modularity of the library. |
Beta Was this translation helpful? Give feedback.
-
The number |
Beta Was this translation helpful? Give feedback.
-
I've added an example that shows how to use |
Beta Was this translation helpful? Give feedback.
-
Hello,
can I somehow control formatting of floats in resulting json string? Basically I would like to limit the maximal count of digits...
Similar code
results in
{"Humidity":40.900001525878906}
best regards
Jan
Beta Was this translation helpful? Give feedback.
All reactions