folly::json::serialize

Serialize dynamic to json-string, with options.

Synopsis

Declared in <folly/json/json.h>

std::string
serialize(
    dynamic const& value,
    serialization_opts const& opts);

Description

Main JSON serialization routine taking folly::dynamic parameters. For the most common use cases there are simpler functions in the main folly namespace.

Return Value

The serialized JSON string.

Parameters

NameDescription
valueThe dynamic value to serialize.
optsThe serialization options to apply.