C++ POCO - How to beautify a JSON? C++ POCO - How to beautify a JSON? json json

C++ POCO - How to beautify a JSON?


As @Dmitry said on the comments, the parameters on the stringify() method would do:

static void stringify(    const Dynamic::Var & any,    std::ostream & out,    unsigned int indent = 0,    int step = - 1,    int options = Poco::JSON_WRAP_STRINGS);

Example:

Poco::JSON::Stringifier::stringify(json, oss, 4, -1, Poco::JSON_PRESERVE_KEY_ORDER);