DAW JSON Link
Public Types | Static Public Attributes | List of all members
daw::json::DAW_JSON_VER::json_key_value_array< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable > Struct Template Reference

#include <daw_json_link_types.h>

Inheritance diagram for daw::json::DAW_JSON_VER::json_key_value_array< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >:
daw::json::DAW_JSON_VER::json_base::json_key_value_array< Container, JsonValueType, JsonKeyType, Constructor, Nullable >

Public Types

template<JSONNAMETYPE NewName>
using with_name = json_key_value_array< NewName, Container, JsonValueType, JsonKeyType, Constructor, Nullable >
 
using without_name = json_base::json_key_value_array< Container, JsonValueType, JsonKeyType, Constructor, Nullable >
 
- Public Types inherited from daw::json::DAW_JSON_VER::json_base::json_key_value_array< Container, JsonValueType, JsonKeyType, Constructor, Nullable >
using base_type = json_details::unwrap_type< Container, Nullable >
 
using constructor_t = json_details::json_class_constructor_t< base_type, Constructor >
 
using i_am_a_json_type = void
 
using json_class_t = json_class< tuple_json_mapping< json_key_t, json_value_t >, std::conditional_t<(Nullable==JsonNullable::MustExist), default_constructor< tuple_json_mapping< json_key_t, json_value_t > >, nullable_constructor< tuple_json_mapping< json_key_t, json_value_t > >>, class_opts_def >
 
using json_key_t = json_details::copy_name_when_noname< json_details::json_deduced_type< JsonKeyType >, json_details::default_key_name >
 
using json_value_t = json_details::copy_name_when_noname< json_details::json_deduced_type< JsonValueType >, json_details::default_value_name >
 
using parse_to_t = typename json_details::construction_result< Nullable !=JsonNullable::MustExist, Constructor, base_type >::type
 
template<JSONNAMETYPE NewName>
using with_name = daw::json::json_key_value_array< NewName, Container, JsonValueType, JsonKeyType, Constructor, Nullable >
 
using without_name = json_key_value_array
 

Static Public Attributes

static constexpr daw::string_view name = Name
 
- Static Public Attributes inherited from daw::json::DAW_JSON_VER::json_base::json_key_value_array< Container, JsonValueType, JsonKeyType, Constructor, Nullable >
static constexpr JsonParseTypes base_expected_type
 
static constexpr JsonParseTypes expected_type
 
static constexpr bool must_be_class_member = false
 
static constexpr daw::string_view name = no_name
 
static constexpr JsonNullable nullable = Nullable
 
static constexpr JsonBaseParseTypes underlying_json_type
 

Detailed Description

template<JSONNAMETYPE Name, typename Container, typename JsonValueType, typename JsonKeyType, typename Constructor, JsonNullable Nullable>
struct daw::json::DAW_JSON_VER::json_key_value_array< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >

Map a KV type json array [ {"key": ValueOfKeyType, "value": ValueOfValueType},... ] to a c++ class. needs to be constructable with a pointer, size

Template Parameters
Namename of JSON member to link to
Containertype to put values in
JsonValueTypeJson type of value in kv pair( e.g. json_number, json_string, ... ). If specific json member type isn't specified, the member name defaults to "value"
JsonKeyTypetype of key in kv pair. If specific json member type isn't specified, the key name defaults to "key"
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

◆ with_name

template<JSONNAMETYPE Name, typename Container , typename JsonValueType , typename JsonKeyType , typename Constructor , JsonNullable Nullable>
template<JSONNAMETYPE NewName>
using daw::json::DAW_JSON_VER::json_key_value_array< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >::with_name = json_key_value_array<NewName, Container, JsonValueType, JsonKeyType, Constructor, Nullable>

◆ without_name

template<JSONNAMETYPE Name, typename Container , typename JsonValueType , typename JsonKeyType , typename Constructor , JsonNullable Nullable>
using daw::json::DAW_JSON_VER::json_key_value_array< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >::without_name = json_base::json_key_value_array<Container, JsonValueType, JsonKeyType, Constructor, Nullable>

Member Data Documentation

◆ name

template<JSONNAMETYPE Name, typename Container , typename JsonValueType , typename JsonKeyType , typename Constructor , JsonNullable Nullable>
constexpr daw::string_view daw::json::DAW_JSON_VER::json_key_value_array< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >::name = Name
staticconstexpr

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