probably worth an option for this
diff --git a/json_object.h b/json_object.h
index 2621112..1f70461 100644
--- a/json_object.h
+++ b/json_object.h
@@ -42,6 +42,10 @@
  * for an example of the format.
  */
 #define JSON_C_TO_STRING_PRETTY     (1<<1)
+/**
+ * A flag to drop trailing zero for float values
+ */
+#define JSON_C_TO_STRING_NOZERO     (1<<2)
 
 #undef FALSE
 #define FALSE ((json_bool)0)