folly::toPrettyJson

Serialize a dynamic into a json string with indentation. Note that the keys of all objects will be sorted.

Synopsis

Declared in <folly/json/json.h>

std::string
toPrettyJson(dynamic const& value);

Return Value

The pretty-printed JSON string.

Parameters

NameDescription
valueThe dynamic value to serialize.