jsoncpp
jsoncpp copied to clipboard
Enhance toStyledString to Support Custom Formatting, Decimal Precision, and Indentation Control
Problem Description The current toStyledString method uses a default StreamWriterBuilder, which has the following limitations: Users cannot customize the output format, lacking flexibility For decimal-type data, there is no convenient way to control the number of displayed digits No functionality to adjust the indentation of output content These restrictions significantly reduce the practicality of toStyledString in scenarios requiring precise control over string output styles (such as data display, logging, etc.). Users have to write additional formatting logic, increasing development costs.