Forked version of MbedJSONValue. I edited the source to allow only two decimal places for a float/double value

Fork of MbedJSONValue by d 0773d

Files at this revision

API Documentation at this revision

Comitter:
d0773d
Date:
Tue Mar 03 22:53:07 2015 +0000
Parent:
5:1291c4bcef0b
Commit message:
NA

Changed in this revision

MbedJSONValue.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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: