29 #ifndef INCLUDE_OLA_WEB_JSONPARSER_H_ 30 #define INCLUDE_OLA_WEB_JSONPARSER_H_ 64 void String(
const std::string &value);
65 void Number(uint32_t value);
66 void Number(int32_t value);
67 void Number(uint64_t value);
68 void Number(int64_t value);
71 void Bool(
bool value);
79 void SetError(
const std::string &error);
114 std::auto_ptr<JsonValue> m_root;
116 std::stack<ContainerType> m_container_stack;
119 std::stack<JsonArray*> m_array_stack;
120 std::stack<JsonObject*> m_object_stack;
128 #endif // INCLUDE_OLA_WEB_JSONPARSER_H_ JsonValue * ClaimRoot()
Get the root of the parse tree, or NULL if parsing failed.
Definition: JsonParser.cpp:174
The base class for JSON values.
Definition: Json.h:119
Represents a JSON double value broken down as separate components.
Definition: Json.h:661
The interface used to handle tokens during JSON parsing.
Definition: JsonLexer.h:71
The class used to parse JSON data.
void ObjectKey(const std::string &key)
Called when a new key is encountered.
Definition: JsonParser.cpp:143
void String(const std::string &value)
Called when a string is encountered.
Definition: JsonParser.cpp:63
void Bool(bool value)
Called when a bool is encountered.
Definition: JsonParser.cpp:91
JsonValue * GetRoot()
Get the root of the parse tree, or NULL if parsing failed.
Definition: JsonParser.cpp:170
A JsonParserInterface implementation that builds a tree of JsonValues.
Definition: JsonParser.h:57
void CloseObject()
Called when an object completes.
Definition: JsonParser.cpp:150
void OpenObject()
Called when an object starts.
Definition: JsonParser.cpp:127
void Null()
Called when a null token is encountered.
Definition: JsonParser.cpp:95
void Begin()
Called when parsing begins.
Definition: JsonParser.cpp:36
void Number(uint32_t value)
Called when a uint32_t is encountered.
Definition: JsonParser.cpp:67
std::string GetError() const
Check if parsing was successful.
Definition: JsonParser.cpp:166
void SetError(const std::string &error)
Can be called at any time to indicate an error with the input data.
Definition: JsonParser.cpp:162
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
void CloseArray()
Called when an array completes.
Definition: JsonParser.cpp:115
void End()
Called when parsing completes.
Definition: JsonParser.cpp:46
static JsonValue * Parse(const std::string &input, std::string *error)
Parse text and return a JsonValue representation.
Definition: JsonParser.cpp:210
void OpenArray()
Called when an array starts.
Definition: JsonParser.cpp:99