Is it possible to use '\t' (tab) for indentation instead of spaces in JSON? #654
-
|
2 Spaces Tab: 1 Tab Tab: I want to use tabs instead of spaces to reduce the JSON file size and for better readability. |
Beta Was this translation helpful? Give feedback.
Answered by
danielaparker
Nov 14, 2025
Replies: 1 comment
-
|
It is now, on master. I've added an auto options = json_options{}
.indent_char('\t')
.indent_size(1);and passing them to encode and dump functions. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sarahlydia9868
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is now, on master. I've added an
indent_charproperty tojson_options, you can now set the option to indent by one tab by configuring options asand passing them to encode and dump functions.