Parse a json formatted stream or string. More...
#include <json_parser.hpp>
Inherits matador::generic_json_parser< json_parser >.
Public Member Functions | |
json_parser ()=default | |
json | parse (const char *str) |
parse a const character string. | |
json | parse (const std::string &str) |
parse a std::string. | |
Additional Inherited Members | |
Protected Member Functions inherited from matador::generic_json_parser< json_parser > | |
generic_json_parser ()=default | |
void | on_parse_object (bool check_for_eos) |
void | on_parse_array (bool check_for_eos) |
void | on_begin_object () |
void | on_object_key (const std::string &) |
void | on_end_object () |
void | on_begin_array () |
void | on_end_array () |
void | on_string (const std::string &) |
void | on_integer (long long) |
void | on_real (double) |
void | on_bool (bool) |
void | on_null () |
void | sync_cursor (const char *cursor) |
Parse a json formatted stream or string.
This class parse a given input stream or string into a json serializable representation. The result will be a matador::json_value serializable.
|
default |
Creates a new json_parser instance
json matador::json_parser::parse | ( | const char * | str | ) |
parse a const character string.
Parses a const character string and returns a json_value serializable representing the json structure.
str | The json const character string. |
json matador::json_parser::parse | ( | const std::string & | str | ) |
parse a std::string.
Parses a std::string and returns a json_value serializable representing the json structure.
str | The json std::string. |