diff --git a/src/io/json.cpp b/src/io/json.cpp index c2fa1a8..f280447 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -443,9 +443,94 @@ namespace fc return ss.str(); } + + fc::string pretty_print( const fc::string& v, uint8_t indent ) { + int level = 0; + fc::stringstream ss; + bool first = false; + bool quote = false; + bool escape = false; + for( uint32_t i = 0; i < v.size(); ++i ) { + switch( v[i] ) { + case '\\': + if( !escape ) { + if( quote ) + escape = true; + } else { escape = false; } + ss<