ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nlohmann::basic_json::json_value Union Reference

a JSON value More...

Public Member Functions

 json_value ()=default
 default constructor (for null values)
 
 json_value (boolean_t v) noexcept
 constructor for booleans
 
 json_value (number_integer_t v) noexcept
 constructor for numbers (integer)
 
 json_value (number_unsigned_t v) noexcept
 constructor for numbers (unsigned)
 
 json_value (number_float_t v) noexcept
 constructor for numbers (floating-point)
 
 json_value (value_t t)
 constructor for empty values of a given type
 
 json_value (const string_t &value)
 constructor for strings
 
 json_value (string_t &&value)
 constructor for rvalue strings
 
 json_value (const object_t &value)
 constructor for objects
 
 json_value (object_t &&value)
 constructor for rvalue objects
 
 json_value (const array_t &value)
 constructor for arrays
 
 json_value (array_t &&value)
 constructor for rvalue arrays
 
void destroy (value_t t) noexcept
 

Public Attributes

object_tobject
 object (stored with pointer to save storage)
 
array_tarray
 array (stored with pointer to save storage)
 
string_tstring
 string (stored with pointer to save storage)
 
boolean_t boolean
 boolean
 
number_integer_t number_integer
 number (integer)
 
number_unsigned_t number_unsigned
 number (unsigned integer)
 
number_float_t number_float
 number (floating-point)
 

Detailed Description

a JSON value

The actual storage for a JSON value of the basic_json class. This union combines the different storage types for the JSON value types defined in value_t.

JSON type value_t type used type
object object pointer to object_t
array array pointer to array_t
string string pointer to string_t
boolean boolean boolean_t
number number_integer number_integer_t
number number_unsigned number_unsigned_t
number number_float number_float_t
null null no value is stored
Note
Variable-length types (objects, arrays, and strings) are stored as pointers. The size of the union should not exceed 64 bits if the default value types are used.
Since
version 1.0.0

Definition at line 15414 of file json.hpp.

View newest version in sPHENIX GitHub at line 15414 of file json.hpp

Constructor & Destructor Documentation

nlohmann::basic_json::json_value::json_value ( )
default

default constructor (for null values)

nlohmann::basic_json::json_value::json_value ( boolean_t  v)
inlinenoexcept

constructor for booleans

Definition at line 15434 of file json.hpp.

View newest version in sPHENIX GitHub at line 15434 of file json.hpp

nlohmann::basic_json::json_value::json_value ( number_integer_t  v)
inlinenoexcept

constructor for numbers (integer)

Definition at line 15436 of file json.hpp.

View newest version in sPHENIX GitHub at line 15436 of file json.hpp

nlohmann::basic_json::json_value::json_value ( number_unsigned_t  v)
inlinenoexcept

constructor for numbers (unsigned)

Definition at line 15438 of file json.hpp.

View newest version in sPHENIX GitHub at line 15438 of file json.hpp

nlohmann::basic_json::json_value::json_value ( number_float_t  v)
inlinenoexcept

constructor for numbers (floating-point)

Definition at line 15440 of file json.hpp.

View newest version in sPHENIX GitHub at line 15440 of file json.hpp

nlohmann::basic_json::json_value::json_value ( value_t  t)
inline

constructor for empty values of a given type

Definition at line 15442 of file json.hpp.

View newest version in sPHENIX GitHub at line 15442 of file json.hpp

References JSON_HEDLEY_UNLIKELY, and JSON_THROW.

nlohmann::basic_json::json_value::json_value ( const string_t value)
inline

constructor for strings

Definition at line 15507 of file json.hpp.

View newest version in sPHENIX GitHub at line 15507 of file json.hpp

nlohmann::basic_json::json_value::json_value ( string_t &&  value)
inline

constructor for rvalue strings

Definition at line 15513 of file json.hpp.

View newest version in sPHENIX GitHub at line 15513 of file json.hpp

nlohmann::basic_json::json_value::json_value ( const object_t value)
inline

constructor for objects

Definition at line 15519 of file json.hpp.

View newest version in sPHENIX GitHub at line 15519 of file json.hpp

nlohmann::basic_json::json_value::json_value ( object_t &&  value)
inline

constructor for rvalue objects

Definition at line 15525 of file json.hpp.

View newest version in sPHENIX GitHub at line 15525 of file json.hpp

nlohmann::basic_json::json_value::json_value ( const array_t value)
inline

constructor for arrays

Definition at line 15531 of file json.hpp.

View newest version in sPHENIX GitHub at line 15531 of file json.hpp

nlohmann::basic_json::json_value::json_value ( array_t &&  value)
inline

constructor for rvalue arrays

Definition at line 15537 of file json.hpp.

View newest version in sPHENIX GitHub at line 15537 of file json.hpp

Member Function Documentation

void nlohmann::basic_json::json_value::destroy ( value_t  t)
inlinenoexcept

Definition at line 15542 of file json.hpp.

View newest version in sPHENIX GitHub at line 15542 of file json.hpp

References array, nlohmann::basic_json::is_array(), nlohmann::basic_json::is_object(), it, nlohmann::basic_json::m_value, object, and t.

+ Here is the call graph for this function:

Member Data Documentation

array_t* nlohmann::basic_json::json_value::array

array (stored with pointer to save storage)

Definition at line 15419 of file json.hpp.

View newest version in sPHENIX GitHub at line 15419 of file json.hpp

Referenced by nlohmann::basic_json::basic_json(), and destroy().

boolean_t nlohmann::basic_json::json_value::boolean

boolean

Definition at line 15423 of file json.hpp.

View newest version in sPHENIX GitHub at line 15423 of file json.hpp

Referenced by nlohmann::basic_json::basic_json().

number_float_t nlohmann::basic_json::json_value::number_float

number (floating-point)

Definition at line 15429 of file json.hpp.

View newest version in sPHENIX GitHub at line 15429 of file json.hpp

Referenced by nlohmann::basic_json::basic_json().

number_integer_t nlohmann::basic_json::json_value::number_integer

number (integer)

Definition at line 15425 of file json.hpp.

View newest version in sPHENIX GitHub at line 15425 of file json.hpp

Referenced by nlohmann::basic_json::basic_json().

number_unsigned_t nlohmann::basic_json::json_value::number_unsigned

number (unsigned integer)

Definition at line 15427 of file json.hpp.

View newest version in sPHENIX GitHub at line 15427 of file json.hpp

Referenced by nlohmann::basic_json::basic_json().

object_t* nlohmann::basic_json::json_value::object

object (stored with pointer to save storage)

Definition at line 15417 of file json.hpp.

View newest version in sPHENIX GitHub at line 15417 of file json.hpp

Referenced by nlohmann::basic_json::basic_json(), and destroy().

string_t* nlohmann::basic_json::json_value::string

string (stored with pointer to save storage)

Definition at line 15421 of file json.hpp.

View newest version in sPHENIX GitHub at line 15421 of file json.hpp

Referenced by nlohmann::basic_json::basic_json().


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