template<typename ValueType , typename >
template<typename BasicJsonType , typename TargetType = ValueType>
convert a JSON value to any value type
This function is usually called by the get()
function of the basic_json class (either explicit or via conversion operators).
- Note
- This function is chosen for value types which are not default-constructible.
- Parameters
-
[in] | j | JSON value to read from |
- Returns
- copy of the JSON value, converted to ValueType
Definition at line 5001 of file json.hpp.
5002 {})))
5003 -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))
5004 {
5005 return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {});
5006 }