19 #ifndef _AAMP_JSON_OBJECT_H
20 #define _AAMP_JSON_OBJECT_H
31 #include <cjson/cJSON.h>
78 bool add(
const std::string& name,
const std::vector<std::string>& values);
97 bool add(
const std::string& name, std::vector<AampJsonObject*>& values);
106 bool get(
const std::string& name, std::vector<std::string>& values);
115 bool get(
const std::string& name,
int& value);
124 bool get(
const std::string& name, std::string& value);
166 void print(std::vector<uint8_t>& data);
174 bool add(
const std::string& name,
bool value);
182 bool add(
const std::string& name,
int value);
191 bool add(
const std::string& name,
double value);
200 bool add(
const std::string& name,
long value);
211 bool add(
const std::string& name, cJSON *value);
218 bool isArray(
const std::string& name);
225 bool isString(
const std::string& name);
232 bool isNumber(
const std::string& name);
239 bool isObject(
const std::string& name);
243 bool add(
const std::string& name);
255 virtual const char* what()
const throw()
257 return "Failed to parse JSON string";
261 #endif //_AAMP_JSON_OBJECT_H