Merge pull request #174 from haata/master

Adding JSON_C_TO_STRING_PRETTY_TAB flag
This commit is contained in:
Eric Haszlakiewicz
2015-05-31 12:10:13 -07:00
2 changed files with 16 additions and 1 deletions

View File

@@ -300,7 +300,14 @@ static void indent(struct printbuf *pb, int level, int flags)
{
if (flags & JSON_C_TO_STRING_PRETTY)
{
printbuf_memset(pb, -1, ' ', level * 2);
if (flags & JSON_C_TO_STRING_PRETTY_TAB)
{
printbuf_memset(pb, -1, '\t', level);
}
else
{
printbuf_memset(pb, -1, ' ', level * 2);
}
}
}