add a valueToQuotedString overload by phlptp · Pull Request #1397 · open-source-parsers/jsoncpp (original) (raw)
to take a string length to support things like a string_view more directly.
The valueToQuotedString method is useful for a few other items related to JSON generation. In many cases we had to use it directly from a std::string_view, which in the present code required conversion to a string, then using the c_str and it computing the length. So this PR adds an overload that allows direct specification of the string length. and a few places in the code that could take advantage of it.