miloyip/rapidjson — pull request #15 by pah (2014-06-25 12:22:55+00:00)
Title: User-defined double output precision

Writing a `double` to an `OutputStream` current prints at most 6 significant
digits (according to the C standard).

The functions `Set/GetDoublePrecision()`, added to the `Writer` classes
can be used to fluently set the precision, i.e. the number of significant
digits to use for writing the double:
````
Writer<...> writer(...);
d.Accept(writer.SetDoublePrecision(12)); // print up to 12 significant digits
````
Additionally, a new `Double(double,int)` overload is added to the `Writer` classes,
allowing to programmatically write a single `double` value with a custom output precision:
````
writer.StartArray()
.Double(1.2345) // == Double(..., writer.GetDoublePrecision())
.Double(1.2345678,9) // explicit precision
.EndArray();
````

An additional unit test `Writer.DoublePrecision` is added as well.
See upstream issues
* http://code.google.com/p/rapidjson/issues/detail?id=67
* http://code.google.com/p/rapidjson/issues/detail?id=68