probably worth an option for this

This commit is contained in:
Remi Collet committed 2012-12-13 11:46:04 +01:00
1 parent 8c847968c7
commit 32d149c8f6
3 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -562,7 +562,7 @@ static int json_object_double_to_json_string(struct json_object* jso,
} else {
p = strchr(buf, '.');
}
if (p) {
if (p && (flags & JSON_C_TO_STRING_NOZERO)) {
/* last useful digit, always keep 1 zero */
p++;
for (q=p ; *q ; q++) {