Tencent / rapidjson

A fast JSON parser/generator for C++ with both SAX/DOM style API
http://rapidjson.org/
Other
14k stars 3.5k forks source link

Writer always prints decimals when a float or double is used #2251

Open Xelus22 opened 5 months ago

Xelus22 commented 5 months ago

Is there currently a flag or Writer option such that if a float or decimal is printed, even if it is a whole number, it does NOT print the trailing decimal?

For example my number could be 16 by chance. But I only want it to print as 16 and not 16.0