83 static JSON*
Parse(
const char* buff,
const char** perror = 0);
86 static JSON*
ParseBuffer(
const char *buff,
int len,
const char** perror = 0);
90 static JSON*
Load(
const char* path,
const char** perror = 0);
93 bool Save(
const char* path);
150 const char*
parseValue(
const char *buff,
const char** perror);
152 const char*
parseArray(
const char* value,
const char** perror);
153 const char*
parseObject(
const char* value,
const char** perror);
154 const char*
parseString(
const char* str,
const char** perror);
void AddArrayNumber(double n)
double GetArrayNumber(int index)
static JSON * createHelper(JSONItemType itemType, double dval, const char *strVal=0)
bool Save(const char *path)
unsigned GetItemCount() const
int GetIntByName(const char *name, int defValue=0)
char * PrintValue(int depth, bool fmt)
void InsertArrayElement(int index, JSON *item)
static JSON * ParseBuffer(const char *buff, int len, const char **perror=0)
void AddArrayString(const char *s)
const char * parseString(const char *str, const char **perror)
const char * parseValue(const char *buff, const char **perror)
double GetNumberByName(const char *name, double defValue=0.0)
void AddBoolItem(const char *name, bool b)
const char * GetArrayString(int index)
static JSON * Parse(const char *buff, const char **perror=0)
String GetStringByName(const char *name, const String &defValue="")
static JSON * Load(const char *path, const char **perror=0)
void AddNullItem(const char *name)
static JSON * CreateObject()
const char * parseObject(const char *value, const char **perror)
void AddArrayElement(JSON *item)
void AddItem(const char *string, JSON *item)
static JSON * CreateArray()
static JSON * CreateNumber(double num)
JSON * GetItemByIndex(unsigned i)
JSON * GetNextItem(JSON *item)
void AddNumberItem(const char *name, double n)
void AddStringItem(const char *name, const char *s)
const char * parseNumber(const char *num)
static JSON * CreateString(const char *s)
int char * index(const char *__s, int __c) __THROW __attribute_pure__ __nonnull((1))
char * PrintArray(int depth, bool fmt)
char * PrintObject(int depth, bool fmt)
JSON * GetPrevItem(JSON *item)
const char * parseArray(const char *value, const char **perror)
static JSON * CreateBool(bool b)
JSON * GetItemByName(const char *name)
static JSON * CreateNull()
JSON(JSONItemType itemType=JSON_Object)
bool GetBoolByName(const char *name, bool defValue=false)