Quick Links: |
#include <baljsn_parserutil.h>
Public Types | |
typedef bdlb::Variant2 < bdlt::Date, bdlt::DateTz > | DateOrDateTz |
typedef bdlb::Variant2 < bdlt::Time, bdlt::TimeTz > | TimeOrTimeTz |
typedef bdlb::Variant2 < bdlt::Datetime, bdlt::DatetimeTz > | DatetimeOrDatetimeTz |
Static Public Member Functions | |
static int | getQuotedString (bsl::string *value, const bsl::string_view &data) |
static int | getUnquotedString (bsl::string *value, const bsl::string_view &data) |
static int | getValue (bool *value, const bsl::string_view &data) |
static int | getValue (char *value, const bsl::string_view &data) |
static int | getValue (unsigned char *value, const bsl::string_view &data) |
static int | getValue (signed char *value, const bsl::string_view &data) |
static int | getValue (short *value, const bsl::string_view &data) |
static int | getValue (unsigned short *value, const bsl::string_view &data) |
static int | getValue (int *value, const bsl::string_view &data) |
static int | getValue (unsigned int *value, const bsl::string_view &data) |
static int | getValue (bsls::Types::Int64 *value, const bsl::string_view &data) |
static int | getValue (bsls::Types::Uint64 *value, const bsl::string_view &data) |
static int | getValue (float *value, const bsl::string_view &data) |
static int | getValue (double *value, const bsl::string_view &data) |
static int | getValue (bdldfp::Decimal64 *value, const bsl::string_view &data) |
static int | getValue (bdlt::Date *value, const bsl::string_view &data) |
static int | getValue (bdlt::Datetime *value, const bsl::string_view &data) |
static int | getValue (bdlt::DatetimeTz *value, const bsl::string_view &data) |
static int | getValue (bdlt::DateTz *value, const bsl::string_view &data) |
static int | getValue (bdlt::Time *value, const bsl::string_view &data) |
static int | getValue (bdlt::TimeTz *value, const bsl::string_view &data) |
static int | getValue (DateOrDateTz *value, const bsl::string_view &data) |
static int | getValue (TimeOrTimeTz *value, const bsl::string_view &data) |
static int | getValue (DatetimeOrDatetimeTz *value, const bsl::string_view &data) |
static int | getValue (bsl::vector< char > *value, const bsl::string_view &data) |
static int | getValue (bsl::string *value, const bsl::string_view &data) |
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 Component baljsn_parserutil
static int baljsn::ParserUtil::getQuotedString | ( | bsl::string * | value, | |
const bsl::string_view & | data | |||
) | [static] |
Load into the specified value
the string value in the specified data
. The string must be begin and end in "
characters which are not part of the resulting value
. Return 0 on success and a non-zero value otherwise.
static int baljsn::ParserUtil::getUnquotedString | ( | bsl::string * | value, | |
const bsl::string_view & | data | |||
) | [static] |
Load into the specified value
the string value in the specified data
. Return 0 on success and a non-zero value otherwise.
static int baljsn::ParserUtil::getValue | ( | bool * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | char * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | unsigned char * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | signed char * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | short * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | unsigned short * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | int * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | unsigned int * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bsls::Types::Int64 * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bsls::Types::Uint64 * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | float * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | double * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bdldfp::Decimal64 * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bdlt::Date * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bdlt::Datetime * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bdlt::DatetimeTz * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bdlt::DateTz * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bdlt::Time * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bdlt::TimeTz * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | DateOrDateTz * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | TimeOrTimeTz * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | DatetimeOrDatetimeTz * | value, | |
const bsl::string_view & | data | |||
) | [static] |
static int baljsn::ParserUtil::getValue | ( | bsl::vector< char > * | value, | |
const bsl::string_view & | data | |||
) | [static] |
Load into the specified value
the characters read from the specified data
. Return 0 on success or a non-zero value on failure.
static int baljsn::ParserUtil::getValue | ( | bsl::string * | value, | |
const bsl::string_view & | data | |||
) | [static] |
Load into the specified value
the string value in the specified data
. The string must be begin and end in "
characters which are not part of the resulting value
. Return 0 on success and a non-zero value otherwise.