Fix bug in json pretty printer which broke formatting and possibly

corrupted json
This commit is contained in:
Nathan Hourt 2014-09-17 13:27:37 -04:00
parent 7966587021
commit 07e3947ed4

View file

@ -626,6 +626,11 @@ namespace fc
ss<<',';
}
break;
case 'n':
//If we're in quotes and see a \n, just print it literally but unset the escape flag.
if( quote && escape )
escape = false;
//No break; fall through to default case
default:
if( first ) {
ss<<'\n';