Added DTMI support to JSON library.

This commit is contained in:
Thulinma 2012-08-23 11:07:49 +02:00
parent 36c7eed7e3
commit 0c5f449963
2 changed files with 208 additions and 0 deletions

View file

@ -59,12 +59,20 @@ namespace JSON{
Value & operator[](const char * i);
Value & operator[](unsigned int i);
//handy functions and others
std::string toPacked();
std::string toString();
std::string toPrettyString(int indentation = 0);
void append(const Value & rhs);
void prepend(const Value & rhs);
void shrink(unsigned int size);
void removeMember(const std::string & name);
bool isMember(const std::string & name) const;
bool isInt() const;
bool isString() const;
bool isBool() const;
bool isObject() const;
bool isArray() const;
bool isNull() const;
ObjIter ObjBegin();
ObjIter ObjEnd();
ArrIter ArrBegin();
@ -73,6 +81,8 @@ namespace JSON{
void null();
};
Value fromDTMI(std::string data);
Value fromDTMI(const unsigned char * data, unsigned int len, unsigned int &i);
Value fromString(std::string json);
Value fromFile(std::string filename);