JSON read value. More...
Public Member Functions | |
rvalue () noexcept | |
rvalue (type t) noexcept | |
rvalue (type t, char *s, char *e) noexcept | |
rvalue (const rvalue &r) | |
rvalue (rvalue &&r) noexcept | |
rvalue & | operator= (const rvalue &r) |
rvalue & | operator= (rvalue &&r) noexcept |
operator bool () const noexcept | |
operator int64_t () const | |
operator uint64_t () const | |
operator int () const | |
operator std::string () const | |
Return any json value (not object or list) as a string. More... | |
type | t () const |
The type of the JSON value. More... | |
num_type | nt () const |
The number type of the JSON value. More... | |
int64_t | i () const |
The integer value. More... | |
uint64_t | u () const |
The unsigned integer value. More... | |
double | d () const |
The double precision floating-point number value. More... | |
bool | b () const |
The boolean value. More... | |
detail::r_string | s () const |
The string value. More... | |
std::vector< rvalue > | lo () |
The list or object value. More... | |
void | unescape () const |
Convert escaped string character to their original form ("\\n" -> ' '). More... | |
bool | has (const char *str) const |
Check if the json object has the passed string as a key. More... | |
bool | has (const std::string &str) const |
int | count (const std::string &str) |
rvalue * | begin () const |
rvalue * | end () const |
const detail::r_string & | key () const |
size_t | size () const |
const rvalue & | operator[] (int index) const |
const rvalue & | operator[] (size_t index) const |
const rvalue & | operator[] (const char *str) const |
const rvalue & | operator[] (const std::string &str) const |
void | set_error () |
bool | error () const |
std::vector< std::string > | keys () |
Private Member Functions | |
bool | is_cached () const |
void | set_cached () const |
void | copy_l (const rvalue &r) |
void | emplace_back (rvalue &&v) |
void | determine_num_type () |
Determines num_type from the string. More... | |
Private Attributes | |
char * | start_ |
char * | end_ |
detail::r_string | key_ |
std::unique_ptr< rvalue[]> | l_ |
uint32_t | lsize_ |
uint16_t | lremain_ |
type | t_ |
num_type | nt_ {num_type::Null} |
uint8_t | option_ {0} |
Static Private Attributes | |
static const int | cached_bit = 2 |
static const int | error_bit = 4 |
Friends | |
rvalue | load_nocopy_internal (char *data, size_t size) |
rvalue | load (const char *data, size_t size) |
std::ostream & | operator<< (std::ostream &os, const rvalue &r) |
JSON read value.
Value can mean any json value, including a JSON object. Read means this class is used to primarily read strings into a JSON value.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
Return any json value (not object or list) as a string.
|
inline |
The type of the JSON value.
|
inline |
The number type of the JSON value.
|
inline |
The integer value.
|
inline |
The unsigned integer value.
|
inline |
The double precision floating-point number value.
|
inline |
The boolean value.
|
inline |
The string value.
|
inline |
The list or object value.
|
inline |
Convert escaped string character to their original form ("\\n" -> '
').
|
inline |
Check if the json object has the passed string as a key.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Determines num_type from the string.
|
friend |
|
friend |
|
friend |
|
staticprivate |
|
staticprivate |
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |