nlohmann::format_as

user-defined format_as function for JSON values (fmt <= 11.0.x support)

Synopsis

Declared in <nlohmann/json.hpp>

template<
    template<
    typename,
    typename,
    typename...> typename ObjectType,
    template<
    typename,
    typename...> typename ArrayType,
    class StringType,
    class BooleanType,
    class NumberIntegerType,
    class NumberUnsignedType,
    class NumberFloatType,
    template<typename> typename AllocatorType,
    template<
    typename,
    typename = void> typename JSONSerializer,
    class BinaryType,
    class CustomBaseClass>
std::string
format_as(basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass> const& j);

Parameters

NameDescription
ja class to store JSON values