DAW JSON Link
Public Types | Static Public Attributes | List of all members
DAW_JSON_NS::json_date< Name, T, Constructor, Nullable > Struct Template Reference

#include <daw_json_link_types.h>

Public Types

using base_type = json_details::unwrap_type< T, Nullable >
 
using constructor_t = Constructor
 
using i_am_a_json_type = void
 
using parse_to_t = std::invoke_result_t< Constructor, char const *, std::size_t >
 
using wrapped_type = T
 

Static Public Attributes

static constexpr JsonParseTypes base_expected_type = JsonParseTypes::Date
 
static constexpr JsonParseTypes expected_type
 
static constexpr daw::string_view name = Name
 
static constexpr bool nullable = Nullable == JsonNullable::Nullable
 
static constexpr JsonBaseParseTypes underlying_json_type
 

Detailed Description

template<JSONNAMETYPE Name, typename T, typename Constructor, JsonNullable Nullable>
struct DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >

Link to a JSON string representing a nullable date

Template Parameters
Namename of JSON member to link to
TC++ type to construct, by default is a time_point
ConstructorA Callable used to construct a T. Must accept a char pointer and size as argument to the date/time string.

Link to a JSON string representing a date

Template Parameters
Namename of JSON member to link to
TC++ type to construct, must be a std::chrono::time_point
ConstructorA Callable used to construct a T. Must accept a char pointer and size as argument to the date/time string. The default is an iso8601 timestamp parser
NullableCan the member be missing or have a null value

Member Typedef Documentation

◆ base_type

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::base_type = json_details::unwrap_type<T, Nullable>

◆ constructor_t

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::constructor_t = Constructor

◆ i_am_a_json_type

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::i_am_a_json_type = void

◆ parse_to_t

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::parse_to_t = std::invoke_result_t<Constructor, char const *, std::size_t>

◆ wrapped_type

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::wrapped_type = T

Member Data Documentation

◆ base_expected_type

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
constexpr JsonParseTypes DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::base_expected_type = JsonParseTypes::Date
staticconstexpr

◆ expected_type

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
constexpr JsonParseTypes DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::expected_type
staticconstexpr
Initial value:
=
get_parse_type_v<JsonParseTypes::Date, Nullable>

◆ name

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
constexpr daw::string_view DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::name = Name
staticconstexpr

◆ nullable

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
constexpr bool DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::nullable = Nullable == JsonNullable::Nullable
staticconstexpr

◆ underlying_json_type

template<JSONNAMETYPE Name, typename T , typename Constructor , JsonNullable Nullable>
constexpr JsonBaseParseTypes DAW_JSON_NS::json_date< Name, T, Constructor, Nullable >::underlying_json_type
staticconstexpr

The documentation for this struct was generated from the following file: