folly::convertTo

Return a well-typed representation of a dynamic.

Synopsis

Declared in <folly/json/DynamicConverter.h>

template<typename T>
T
convertTo(dynamic const& d);

Description

See docs/DynamicConverter.md for supported types and customization.

Return Value

The value converted to type T. refcode folly/docs/examples/folly/DynamicConverter.cpp

Template Parameters

NameDescription
TA type representing the structure of the dynamic argument.

Parameters

NameDescription
dThe dynamic value to convert.