DAW JSON Link
Typedefs | Enumerations | Functions
daw::json::anonymous_namespace{daw_json_enums.h} Namespace Reference

Typedefs

template<JsonParseTypes v>
using ParseTag = daw::constant< v >
 

Enumerations

enum class  JsonBaseParseTypes : std::uint_fast8_t {
  Number , Bool , String , Class ,
  Array , Null , None
}
 The fundamental JSON types. More...
 
enum class  JsonNullable : unsigned { Nullable , NullVisible }
 Control how json_nullable members are serialized. More...
 
enum class  JsonParseTypes : std::uint_fast8_t {
  Real , Signed , Unsigned , Bool ,
  StringRaw , StringEscaped , Date , Class ,
  Array , SizedArray , Null , KeyValue ,
  KeyValueArray , Custom , Variant , VariantTagged ,
  VariantIntrusive , Tuple , Unknown
}
 The tags used by the parser to determine what parser to call. More...
 

Functions

constexpr std::string_view to_string (JsonBaseParseTypes pt)
 

Typedef Documentation

◆ ParseTag

template<JsonParseTypes v>
using daw::json::anonymous_namespace{daw_json_enums.h}::ParseTag = typedef daw::constant<v>

Tag lookup for parsing overload selection

Definition at line 97 of file daw_json_enums.h.

Enumeration Type Documentation

◆ JsonBaseParseTypes

enum daw::json::anonymous_namespace{daw_json_enums.h}::JsonBaseParseTypes : std::uint_fast8_t
strong

The fundamental JSON types.

Enumerator
Number 
Bool 
String 
Class 
Array 
Null 
None 

Definition at line 52 of file daw_json_enums.h.

◆ JsonNullable

enum daw::json::anonymous_namespace{daw_json_enums.h}::JsonNullable : unsigned
strong

Control how json_nullable members are serialized.

Enumerator
Nullable 

Default null property. When serializing member isn't serialized.

NullVisible 

Always serialize member and output null when value is not engaged.

Definition at line 84 of file daw_json_enums.h.

◆ JsonParseTypes

enum daw::json::anonymous_namespace{daw_json_enums.h}::JsonParseTypes : std::uint_fast8_t
strong

The tags used by the parser to determine what parser to call.

Enumerator
Real 
Signed 

Number - Floating Point.

Unsigned 

Number - Signed Integer.

Bool 

Number - Unsigned Integer.

StringRaw 

Boolean.

StringEscaped 

String - A raw string as is. Escapes are left in.

Date 

String - Fully processed string.

Class 

ISO 8601 Timestamp.

Array 

A class type with named members.

SizedArray 

An array type with homogenous members.

Null 

An array with a fixed size. This allows for size_t/ptr like combinations.

KeyValue 

A null member.

KeyValueArray 

Class - Member names form the string key into a key/value,map, or dictionary like type.

Custom 

Array - Each element has a key and a value submember.

Variant 

Can be a literal, string, or either and allows for some customized parsing.

VariantTagged 

Any one of the basic json types class/array/boolean/number/string.

VariantIntrusive 

A variant with up to N types and a Switcher callable that takes uses another member to determine what type to parse. This is often a type/value like pair.

Tuple 

A variant type where the Switcher is based on a submember of the class being parsed.

Unknown 

Array - An array type where each element is mapped to the member of a C++ class.

Definition at line 21 of file daw_json_enums.h.

Function Documentation

◆ to_string()

constexpr std::string_view daw::json::anonymous_namespace{daw_json_enums.h}::to_string ( JsonBaseParseTypes  pt)
constexpr

Definition at line 62 of file daw_json_enums.h.