8 #ifndef COMPONENTS_CPP_UTILS_JSON_H_
9 #define COMPONENTS_CPP_UTILS_JSON_H_
71 int getInt(std::string name);
78 void setDouble(std::string name,
double value);
79 void setInt(std::string name,
int value);
81 void setString(std::string name, std::string value);
void setDouble(std::string name, double value)
Set the named double property.
Definition: JSON.cpp:327
double getDouble(std::string name)
Get the named double value from the object.
Definition: JSON.cpp:239
A JSON object.
Definition: JSON.h:66
std::string getString(std::string name)
Get the named string value from the object.
Definition: JSON.cpp:274
void setString(std::string name, std::string value)
Set the named string property.
Definition: JSON.cpp:360
double getDouble(int item)
Get the indexed double value from the array.
Definition: JSON.cpp:138
Top level JSON handler.
Definition: JSON.h:20
void setInt(std::string name, int value)
Set the named int property.
Definition: JSON.cpp:338
int getInt(std::string name)
Get the named int value from the object.
Definition: JSON.cpp:251
static void deleteArray(JsonArray jsonArray)
Delete a JSON array.
Definition: JSON.cpp:38
void addObject(JsonObject value)
Add an object value to the array.
Definition: JSON.cpp:108
bool getBoolean(int item)
Get the indexed boolean value from the array.
Definition: JSON.cpp:127
static JsonArray parseArray(std::string text)
Parse a string that contains a JSON array.
Definition: JSON.cpp:57
void setArray(std::string name, JsonArray array)
Set the named array property.
Definition: JSON.cpp:305
JsonObject getObject(std::string name)
Get the named object value from the object.
Definition: JSON.cpp:263
static JsonObject parseObject(std::string text)
Parse a string that contains a JSON object.
Definition: JSON.cpp:67
void addDouble(double value)
Add a double value to the array.
Definition: JSON.cpp:90
std::string toString()
Convert the JSON object to a string.
Definition: JSON.cpp:369
int getInt(int item)
Get the indexed int value from the array.
Definition: JSON.cpp:149
std::size_t size()
Get the number of elements from the array.
Definition: JSON.cpp:205
JsonObject getObject(int item)
Get the indexed object value from the array.
Definition: JSON.cpp:160
void addString(std::string value)
Add a string value to the array.
Definition: JSON.cpp:117
static void deleteObject(JsonObject jsonObject)
Delete a JSON object.
Definition: JSON.cpp:47
static JsonObject createObject()
Create an empty JSON object.
Definition: JSON.cpp:28
std::string toStringUnformatted()
Build an unformatted string representation.
Definition: JSON.cpp:193
std::string toStringUnformatted()
Build an unformatted string representation.
Definition: JSON.cpp:381
void addInt(int value)
Add an int value to the array.
Definition: JSON.cpp:99
void addBoolean(bool value)
Add a boolean value to the array.
Definition: JSON.cpp:81
bool isValid()
Determine if this represents a valid JSON node.
Definition: JSON.cpp:295
bool hasItem(std::string name)
Determine if the object has the specified item.
Definition: JSON.cpp:286
void setObject(std::string name, JsonObject value)
Set the named object property.
Definition: JSON.cpp:349
void setBoolean(std::string name, bool value)
Set the named boolean property.
Definition: JSON.cpp:316
std::string getString(int item)
Get the indexed object value from the array.
Definition: JSON.cpp:171
bool getBoolean(std::string name)
Get the named boolean value from the object.
Definition: JSON.cpp:227
std::string toString()
Convert the JSON array to a string.
Definition: JSON.cpp:181
A JSON array.
Definition: JSON.h:35
static JsonArray createArray()
Create an empty JSON array.
Definition: JSON.cpp:19