Go to the documentation of this file.
3 #include "rapidjson/reader.h"
21 bool Null() {
return true; }
35 bool RawNumber(
const char* str, rapidjson::SizeType ,
bool )
40 bool String(
const char* str, rapidjson::SizeType ,
bool )
67 bool Key(
const char* str, rapidjson::SizeType ,
bool ) {
key = str;
return true; }
109 rapidjson::StringStream ss(s);
111 rapidjson::Reader reader;
112 reader.Parse(ss, handler);
114 if (reader.HasParseError())
116 error_ =
"Could not parse string";
194 if (i_next_array_item_ == 0)
203 if (i_next_array_item_ >= array.
size())
207 ++i_next_array_item_;
216 return value<float>(key, f);
223 return value<double>(key, d);
231 return value<int>(key, i);
238 return value<std::string>(key, s);
bool EndObject(rapidjson::SizeType)
std::vector< unsigned int > array_parents
bool String(const char *str, rapidjson::SizeType, bool)
std::vector< unsigned int > map_parents
void writeGroup(const std::string &key)
JSONReader(const char *s)
bool readValue(const std::string &, float &f)
bool readArray(const std::string &name)
bool readGroup(const std::string &name)
bool EndArray(rapidjson::SizeType)
bool Key(const char *str, rapidjson::SizeType, bool)
MyHandler(ed::io::DataWriter &w_)
std::vector< unsigned char > stack
std::vector< std::vector< Node > > arrays
std::vector< std::map< std::string, Node > > maps
void writeArray(const std::string &key)
bool RawNumber(const char *str, rapidjson::SizeType, bool)
void setValue(const std::string &key, const Variant &value)
std::vector< unsigned int > array_index_stack_