akheron / jansson

C library for encoding, decoding and manipulating JSON data
http://www.digip.org/jansson/
Other
3.05k stars 809 forks source link

Add flag for extra indentation #588

Open MortenBroerup opened 3 years ago

MortenBroerup commented 3 years ago

I propose a JSON_INDENT_EXTRA(n) flag to indent all lines by n additional spaces.

This is useful when dumping the outer of a JSON array manually using sprintf() or similar, and individually dumping the array's elements using e.g. json_dumps().