6 throw std::logic_error(
"Improper return");
11 throw std::logic_error(
"Improper return");
16 throw std::logic_error(
"Improper return");
21 throw std::logic_error(
"Improper return");
26 throw std::logic_error(
"Improper return");
52 string spaceString = string(indentationLevel,
' ');
54 std::stringstream output;
66 output << spaceString << (
values.
bValue ?
"true" :
"false");
70 output << spaceString <<
"null";
75 output << spaceString <<
"[\n";
76 unsigned int index = 0;
77 for (JSONList::iterator i = (*
values.
list).begin();
79 output << (*i)->stringify(indentationLevel + 1);
85 output <<
"\n" << spaceString <<
"]\n";
89 output << spaceString <<
"{\n";
92 output << spaceString <<
" "
93 <<
"\"" << i->first <<
"\""
95 output << i->second->stringify(indentationLevel + 1);
96 JSONObject::iterator next = i;
101 output << spaceString <<
"\n";
103 output << spaceString <<
"}";
union JSONNode::Values values
void setObject(JSONObject *object)
string stringify(int indentationLevel)
void setString(string *str)
void setList(JSONList *list)
std::vector< JSONNode * > JSONList
std::map< string, JSONNode * > JSONObject