![]() |
Argo
1.0
A C++ library for handling JSON.
|
Lexical tokens read from a JSON message. More...
#include <token.hpp>
Public Types | |
enum | token_type { begin_array_e, begin_object_e, end_array_e, end_object_e, name_separator_e, value_separator_e, number_int_e, number_double_e, string_e, false_e, true_e, null_e } |
Type of the token. Matches the RFC except that ints and floats are separated out. More... | |
Public Member Functions | |
token () noexcept | |
Constructor. null token. | |
token (const token &other) | |
Copy constructor. Deep copy. | |
token (token &&other) | |
Move constructor. Shallow copy. | |
token (token_type t) | |
token (token_type t, const char *raw_value, size_t len) | |
virtual | ~token () |
token & | operator= (const token &other) |
Assignment. Deep copy. | |
token & | operator= (token &&other) |
Move. Shallow copy. | |
const std::string & | get_raw_value () const |
Get the raw untranslated JSON value. | |
token_type | get_type () const |
Get the token type. | |
Lexical tokens read from a JSON message.
A lexical token read from a JSON message. The underlying string and number values are held in non-converted form to allow a caller further up the stack to decide how to interpret them.
Type of the token. Matches the RFC except that ints and floats are separated out.
token::token | ( | token_type | t | ) |
token::token | ( | token_type | t, |
const char * | raw_value, | ||
size_t | len | ||
) |