26 #include "JSONElement.h"
27 #include "StringUtil.h"
33 static void array(
string& json,
JSONElement* element);
34 static void object(
string& json,
JSONElement* element);
35 static void arrayOrObject(
string& json,
JSONElement* element);
36 static void readJSON(
string& json,
bool isarray,
JSONElement *par);
37 static void validateSetValue(
JSONElement* element,
string value);
43 template <
typename T>
static vector<T>* toVectorP(
JSONElement root)
45 vector<T>* vec =
new vector<T>;
46 for(
int i=0;i<(int)root.getChildren().size();i++)
50 vec->push_back(CastUtil::lexical_cast<T>(element->getValue()));