17 for(
const auto &ch : src)
76 out << std::string(indent*2,
' ');
88 for(arrayt::const_iterator a_it=
array.begin();
92 if(a_it!=
array.begin())
98 out << std::string((indent+1)*2,
' ');
103 a_it->output_rec(out, indent+1);
106 if(
array.back().is_object())
107 out <<
'\n' << std::string(indent*2,
' ');
134 for(objectt::const_iterator o_it =
object.begin(); o_it !=
object.end();
137 if(o_it !=
object.begin())
144 out << std::string((indent + 1) * 2,
' ');
147 o_it->second.output_rec(out, indent + 1);
162 other.
object.swap(
object);
static void output_object(std::ostream &out, const objectt &object, unsigned indent)
Basic handling of the printing of a JSON object.
static void output_key(std::ostream &out, const std::string &key)
static void escape_string(const std::string &, std::ostream &)
std::map< std::string, jsont > objectt
void output_rec(std::ostream &, unsigned indent) const
Recursive printing of the json object.
static const jsont null_json_object