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

#include <daw_json_link_types.h>

Public Types

using base_type = json_details::unwrap_type< Container, Nullable >
 
using constructor_t = Constructor
 
using i_am_a_json_type = void
 
using json_element_t = json_details::unnamed_default_type_mapping< JsonElement >
 
using parse_to_t = std::invoke_result_t< Constructor >
 

Static Public Attributes

static constexpr JsonParseTypes base_expected_type = JsonParseTypes::Array
 
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 JsonElement, typename Container, typename Constructor, JsonNullable Nullable>
struct DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >

Link to a JSON array

Template Parameters
Namename of JSON member to link to
Containertype of C++ container being constructed(e.g. vector<int>)
JsonElementJson type being parsed e.g. json_number, json_string...
ConstructorA callable used to make Container, default will use the Containers constructor. Both normal and aggregate are supported
NullableCan the member be missing or have a null value

Member Typedef Documentation

◆ base_type

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::base_type = json_details::unwrap_type<Container, Nullable>

◆ constructor_t

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::constructor_t = Constructor

◆ i_am_a_json_type

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::i_am_a_json_type = void

◆ json_element_t

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::json_element_t = json_details::unnamed_default_type_mapping<JsonElement>

◆ parse_to_t

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
using DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::parse_to_t = std::invoke_result_t<Constructor>

Member Data Documentation

◆ base_expected_type

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
constexpr JsonParseTypes DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::base_expected_type = JsonParseTypes::Array
staticconstexpr

◆ expected_type

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
constexpr JsonParseTypes DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::expected_type
staticconstexpr
Initial value:
=
get_parse_type_v<JsonParseTypes::Array, Nullable>

◆ name

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
constexpr daw::string_view DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::name = Name
staticconstexpr

◆ nullable

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
constexpr bool DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::nullable = Nullable == JsonNullable::Nullable
staticconstexpr

◆ underlying_json_type

template<JSONNAMETYPE Name, typename JsonElement , typename Container , typename Constructor , JsonNullable Nullable>
constexpr JsonBaseParseTypes DAW_JSON_NS::json_array< Name, JsonElement, Container, Constructor, Nullable >::underlying_json_type
staticconstexpr

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