24 Feb
2023
24 Feb
'23
9:20 a.m.
Hi there, I convert a std::vector<std::vector<float>> to a JSON string. Basically it works, but the format is scientific: "[[1.017E3,1.017E3,1.017E3 ... ]]" My method looks now like this: std::string Class::convertFieldAsJSON(std::vector<std::vector<float>> field) { return boost::json::serialize(boost::json::value_from(field)); } It works, but my colleagues want to see a 1017 and not 1.017E3 in the output. Is there a way to format the string? Thanks in advance, Markus