It's awesome that you allow for short arrays to be printed in single line. I would like to suggest extending this option also to objects and maybe even objects nested in arrays which are still short.
So that:
{
"shortArray": [1, 2, 3, 4],
"shortObject": {
"code:": "some_code",
"value": 13262234
},
"shortNested": [
{
"something": "any value",
"stuff": 12345
}
]
}
instead becomes
{
"shortArray": [1, 2, 3, 4],
"shortObject": { "code:": "some_code", "value": 13262234 },
"shortNested": [{ "something": "any value", "stuff": 12345 }]
}
When a single prop object takes 3 lines instead of one and you have a long file it can make a big difference.
I can see how not everyone would want this, especially with shorter JSON files, but maybe that could be optional as well.
It's awesome that you allow for short arrays to be printed in single line. I would like to suggest extending this option also to objects and maybe even objects nested in arrays which are still short.
So that:
{ "shortArray": [1, 2, 3, 4], "shortObject": { "code:": "some_code", "value": 13262234 }, "shortNested": [ { "something": "any value", "stuff": 12345 } ] }instead becomes
{ "shortArray": [1, 2, 3, 4], "shortObject": { "code:": "some_code", "value": 13262234 }, "shortNested": [{ "something": "any value", "stuff": 12345 }] }When a single prop object takes 3 lines instead of one and you have a long file it can make a big difference.
I can see how not everyone would want this, especially with shorter JSON files, but maybe that could be optional as well.