33 #ifndef INCLUDE_OLA_WEB_JSONLEXER_H_
34 #define INCLUDE_OLA_WEB_JSONLEXER_H_
62 static bool Parse(
const std::string &input,
79 virtual void Begin() = 0;
84 virtual void End() = 0;
91 virtual void String(
const std::string &value) = 0;
96 virtual void Number(uint32_t value) = 0;
101 virtual void Number(int32_t value) = 0;
106 virtual void Number(uint64_t value) = 0;
111 virtual void Number(int64_t value) = 0;
126 virtual void Number(
double d) = 0;
131 virtual void Bool(
bool value) = 0;
136 virtual void Null() = 0;
160 virtual void ObjectKey(
const std::string &key) = 0;
170 virtual void SetError(
const std::string &error) = 0;
176 #endif // INCLUDE_OLA_WEB_JSONLEXER_H_
Represents a JSON double value broken down as separate components.
Definition: Json.h:661
virtual void OpenObject()=0
Called when an object starts.
virtual void CloseObject()=0
Called when an object completes.
virtual void CloseArray()=0
Called when an array completes.
virtual void SetError(const std::string &error)=0
Can be called at any time to indicate an error with the input data.
The interface used to handle tokens during JSON parsing.
Definition: JsonLexer.h:71
Parse a string containing Json data.
Definition: JsonLexer.h:54
virtual void OpenArray()=0
Called when an array starts.
virtual void ObjectKey(const std::string &key)=0
Called when a new key is encounted.
virtual void String(const std::string &value)=0
Called when a string is encounted.
virtual void Number(uint32_t value)=0
Called when a uint32_t is encounted.
virtual void Begin()=0
Called when parsing begins.
virtual void Bool(bool value)=0
Called when a bool is encounted.
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
static bool Parse(const std::string &input, class JsonParserInterface *handler)
Parse a string containing JSON data.
Definition: JsonLexer.cpp:432
virtual void Null()=0
Called when a null token is encounted.
Basic data types used to represent elements in a JSON document.
virtual void End()=0
Called when parsing completes.