Crow  1.1
A C++ microframework for the web
crow::json::rvalue Class Reference

JSON read value. More...

#include <json.h>

Public Member Functions

 rvalue (type t) noexcept
 
 rvalue (type t, char *s, char *e) noexcept
 
 rvalue (const rvalue &r)
 
 rvalue (rvalue &&r) noexcept
 
rvalueoperator= (const rvalue &r)
 
rvalueoperator= (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.
 
type t () const
 The type of the JSON value.
 
num_type nt () const
 The number type of the JSON value.
 
int64_t i () const
 The integer value.
 
uint64_t u () const
 The unsigned integer value.
 
double d () const
 The double precision floating-point number value.
 
bool b () const
 The boolean value.
 
detail::r_string s () const
 The string value.
 
std::vector< rvaluelo () const
 The list or object value.
 
void unescape () const
 Convert escaped string character to their original form ("\\n" -> '
').
 
bool has (const char *str) const
 Check if the json object has the passed string as a key.
 
bool has (const std::string &str) const
 
int count (const std::string &str) const
 
rvaluebegin () const
 
rvalueend () const
 
const detail::r_stringkey () const
 
size_t size () const
 
const rvalueoperator[] (int index) const
 
const rvalueoperator[] (size_t index) const
 
const rvalueoperator[] (const char *str) const
 
const rvalueoperator[] (const std::string &str) const
 
void set_error ()
 
bool error () const
 
std::vector< std::string > keys () const
 

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)
 

Detailed Description

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.


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