src/c++/include/common/JsonHelpers.hh
/**
 * Write a Json::Value object to string
 * indent = false also suppresses line breaks
 */
Write a Json::Value object to string
indent = false also suppresses line breaks
Write a Json :: Value object to string indent = false also suppresses line breaks
static inline std::string writeJson(Json::Value const& val, bool indent = true, int float_precision = 5)
{
    Json::StreamWriterBuilder wBuilder;
    wBuilder["precision"] = float_precision;
    wBuilder["useSpecialFloats"] = false;
    if (!indent)
    {
        wBuilder["indentation"] = "";
    }
    return Json::writeString(wBuilder, val);
}
static inline std :: string writeJson ( Json :: Value const & val , bool indent = true , int float_precision = 5 ) { Json :: StreamWriterBuilder wBuilder ; wBuilder [ " " ] = float_precision ; wBuilder [ " " ] = false ; if ( ! indent ) { wBuilder [ " " ] = " " ; } return Json :: writeString ( wBuilder , val ) ; }
Write a Json::Value object to string
 indent = false also suppresses line breaks
Write a Json :: Value object to string indent = false also suppresses line breaks