BDE 4.39.x Production Release
Loading...
Searching...
No Matches
baljsn::JsonParserUtil Struct Reference

#include <baljsn_jsonparserutil.h>

Detailed Description

This class provides utility functions for decoding data in the JSON format into a bdeat Simple type. The primary method is getValue, which decodes into a specified object and is overloaded for all bdeat Simple types.

See baljsn_jsonparserutil

Static Public Member Functions

static int getValue (bool *value, const bdljsn::Json &json)
 
static int getValue (char *value, const bdljsn::Json &json)
 
static int getValue (unsigned char *value, const bdljsn::Json &json)
 
static int getValue (signed char *value, const bdljsn::Json &json)
 
static int getValue (short *value, const bdljsn::Json &json)
 
static int getValue (unsigned short *value, const bdljsn::Json &json)
 
static int getValue (int *value, const bdljsn::Json &json)
 
static int getValue (unsigned int *value, const bdljsn::Json &json)
 
static int getValue (bsls::Types::Int64 *value, const bdljsn::Json &json)
 
static int getValue (bsls::Types::Uint64 *value, const bdljsn::Json &json)
 
static int getValue (float *value, const bdljsn::Json &json)
 
static int getValue (double *value, const bdljsn::Json &json)
 
static int getValue (bdldfp::Decimal64 *value, const bdljsn::Json &json)
 
static int getValue (bsl::string *value, const bdljsn::Json &json)
 
static int getValue (std::string *value, const bdljsn::Json &json)
 
static int getValue (bdlt::Date *value, const bdljsn::Json &json)
 
static int getValue (bdlt::Datetime *value, const bdljsn::Json &json)
 
static int getValue (bdlt::DatetimeTz *value, const bdljsn::Json &json)
 
static int getValue (bdlt::DateTz *value, const bdljsn::Json &json)
 
static int getValue (bdlt::Time *value, const bdljsn::Json &json)
 
static int getValue (bdlt::TimeTz *value, const bdljsn::Json &json)
 
static int getValue (ParserUtil::DateOrDateTz *value, const bdljsn::Json &json)
 
static int getValue (ParserUtil::TimeOrTimeTz *value, const bdljsn::Json &json)
 
static int getValue (ParserUtil::DatetimeOrDatetimeTz *value, const bdljsn::Json &json)
 
static int getValue (bsl::vector< char > *value, const bdljsn::Json &data)
 

Member Function Documentation

◆ getValue() [1/25]

int baljsn::JsonParserUtil::getValue ( bdldfp::Decimal64 value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [2/25]

int baljsn::JsonParserUtil::getValue ( bdlt::Date value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [3/25]

int baljsn::JsonParserUtil::getValue ( bdlt::Datetime value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [4/25]

int baljsn::JsonParserUtil::getValue ( bdlt::DatetimeTz value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [5/25]

int baljsn::JsonParserUtil::getValue ( bdlt::DateTz value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [6/25]

int baljsn::JsonParserUtil::getValue ( bdlt::Time value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [7/25]

int baljsn::JsonParserUtil::getValue ( bdlt::TimeTz value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [8/25]

int baljsn::JsonParserUtil::getValue ( bool *  value,
const bdljsn::Json json 
)
inlinestatic

Load into the specified value the characters read from the specified data. Return 0 on success or a non-zero value on failure.

Precondition
The behavior is undefined unless 'json.isBoolean())'

◆ getValue() [9/25]

int baljsn::JsonParserUtil::getValue ( bsl::string value,
const bdljsn::Json json 
)
inlinestatic

Load into the specified value the characters read from the specified data. Return 0 on success or a non-zero value on failure.

Precondition
The behavior is undefined unless 'json.isString())'

◆ getValue() [10/25]

static int baljsn::JsonParserUtil::getValue ( bsl::vector< char > *  value,
const bdljsn::Json data 
)
static

◆ getValue() [11/25]

int baljsn::JsonParserUtil::getValue ( bsls::Types::Int64 value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [12/25]

int baljsn::JsonParserUtil::getValue ( bsls::Types::Uint64 value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [13/25]

int baljsn::JsonParserUtil::getValue ( char *  value,
const bdljsn::Json json 
)
inlinestatic

Load into the specified value the characters read from the specified data. Return 0 on success or a non-zero value on failure.

Precondition
The behavior is undefined unless 'json.isNumber())'

◆ getValue() [14/25]

int baljsn::JsonParserUtil::getValue ( double *  value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [15/25]

int baljsn::JsonParserUtil::getValue ( float *  value,
const bdljsn::Json json 
)
inlinestatic

Load into the specified value the characters read from the specified data. Return 0 on success or a non-zero value on failure.

Precondition
The behavior is undefined unless 'json.isNumber())' or 'json.isString()' if the value is INF, -INF, or NaN.

◆ getValue() [16/25]

int baljsn::JsonParserUtil::getValue ( int *  value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [17/25]

int baljsn::JsonParserUtil::getValue ( ParserUtil::DateOrDateTz value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [18/25]

static int baljsn::JsonParserUtil::getValue ( ParserUtil::DatetimeOrDatetimeTz value,
const bdljsn::Json json 
)
static

◆ getValue() [19/25]

static int baljsn::JsonParserUtil::getValue ( ParserUtil::TimeOrTimeTz value,
const bdljsn::Json json 
)
static

◆ getValue() [20/25]

int baljsn::JsonParserUtil::getValue ( short *  value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [21/25]

int baljsn::JsonParserUtil::getValue ( signed char *  value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [22/25]

int baljsn::JsonParserUtil::getValue ( std::string *  value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [23/25]

int baljsn::JsonParserUtil::getValue ( unsigned char *  value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [24/25]

int baljsn::JsonParserUtil::getValue ( unsigned int *  value,
const bdljsn::Json json 
)
inlinestatic

◆ getValue() [25/25]

int baljsn::JsonParserUtil::getValue ( unsigned short *  value,
const bdljsn::Json json 
)
inlinestatic

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