inline void pack( Stream& s, const variant_object& v ) { unsigned_int vs = (uint32_t)v.size(); pack( s, vs ); for( auto itr = v.begin(); itr != v.end(); ++itr ) { pack( s, itr->key() ); pack( s, itr->value() ); } }
void to_stream( T& os, const variant_object& o, json::output_formatting format, uint32_t max_depth ) { os << '{'; auto itr = o.begin(); while( itr != o.end() ) { escape_string( itr->key(), os ); os << ':'; to_stream( os, itr->value(), format, max_depth ); ++itr; if( itr != o.end() ) os << ','; } os << '}'; }