DAW JSON Link
Public Types | Static Public Attributes | List of all members
daw::json::DAW_JSON_VER::json_key_value< 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< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >:
daw::json::DAW_JSON_VER::json_base::json_key_value< Container, JsonValueType, JsonKeyType, Constructor, Nullable >

Public Types

template<JSONNAMETYPE NewName>
using with_name = json_key_value< NewName, Container, JsonValueType, JsonKeyType, Constructor, Nullable >
 
using without_name = json_base::json_key_value< Container, JsonValueType, JsonKeyType, Constructor, Nullable >
 
- Public Types inherited from daw::json::DAW_JSON_VER::json_base::json_key_value< 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_element_t = json_details::json_deduced_type< JsonValueType >
 
using json_key_t = json_details::json_deduced_type< JsonKeyType >
 
using parse_to_t = typename json_details::construction_result< Nullable !=JsonNullable::MustExist, Constructor, std::pair< typename json_key_t::parse_to_t const, typename json_element_t::parse_to_t > const *, std::pair< typename json_key_t::parse_to_t const, typename json_element_t::parse_to_t > const * >::type
 
template<JSONNAMETYPE NewName>
using with_name = daw::json::json_key_value< NewName, Container, JsonValueType, JsonKeyType, Constructor, Nullable >
 
using without_name = json_key_value
 

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< 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< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >

Map a KV type json class { "Key StringRaw": ValueType, ... } to a c++ class. Keys are Always string like and the destination 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, ... ). It also supports basic types like numbers, bool, and mapped classes and enums(mapped to numbers)
JsonKeyTypetype of key in kv pair. As with value it supports basic types too
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< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >::with_name = json_key_value<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< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >::without_name = json_base::json_key_value<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< Name, Container, JsonValueType, JsonKeyType, Constructor, Nullable >::name = Name
staticconstexpr

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