template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer, class BinaryType = std::vector<std::uint8_t>>
ValueType nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_impl |
( |
detail::priority_tag< 1 > |
| ) |
const |
|
inlineprivatenoexcept |
get a value (explicit); special case
Explicit type conversion between the JSON value and a compatible value which is not CopyConstructible and not DefaultConstructible. The value is converted by calling the json_serializer<ValueType> from_json()
method.
The function is equivalent to executing
return JSONSerializer<ValueType>::from_json(*this);
This overloads is chosen if:
- ValueType is not basic_json and
- json_serializer<ValueType> has a
from_json()
method of the form ValueType from_json(const basic_json&)
- Note
- If json_serializer<ValueType> has both overloads of
from_json()
, this one is chosen.
- Template Parameters
-
ValueType | the returned value type |
- Returns
- copy of the JSON value, converted to ValueType
- Exceptions
-
what | json_serializer<ValueType> from_json() method throws |
- Since
- version 2.1.0
Definition at line 20811 of file json.hpp.
20813 {
20814 return JSONSerializer<ValueType>::from_json(*this);
20815 }