nlohmann::basic_json<>::get

get a (pointer) value (explicit)

Synopsis

Declared in <nlohmann/json.hpp>
template<
    typename ValueTypeCV,
    typename ValueType = detail::uncvref_t<ValueTypeCV>>
constexpr
decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))
get() const noexcept(noexcept(std::declval<const basic_json_t &>().template get_impl<ValueType>(detail::priority_tag<4>{})));

Description

Performs explicit type conversion between the JSON value and a compatible value if required.

Exceptions

Name Thrown on
what json_serializer<ValueType> from_json() method throws if conversion is required

Return Value

copy of the JSON value, converted to

Template Parameters

Name Description
ValueTypeCV the provided value type
ValueType the returned value type
ValueType if necessary