Forked version of MbedJSONValue. I edited the source to allow only two decimal places for a float/double value
Fork of MbedJSONValue by
Diff: MbedJSONValue.cpp
- Revision:
- 6:0c788cef9bfa
- Parent:
- 5:1291c4bcef0b
--- a/MbedJSONValue.cpp Wed Oct 10 08:40:03 2012 +0000 +++ b/MbedJSONValue.cpp Tue Mar 03 22:53:07 2015 +0000 @@ -89,7 +89,7 @@ case TypeDouble: { char buf[10]; //sprintf(buf, "%f", _value.asDouble); - sprintf(buf, "%.2f", _value.asDouble); //limits the trailing zeros at the end of a double value + sprintf(buf, "%.1f", _value.asDouble); //limits the trailing zeros at the end of a double value return buf; } default: