How to format spaces in IDEA JSON formatting for empty objects and arrays -
i have large json file lot of empty objects , arrays, when format file in intellij idea adds automatically spaces empty objects , arrays.
so, was:
{ "someobject": {}, "somearray": [] }
became:
{ "someobject": { }, "somearray": [ ] }
and other lines this.
since our team uses different editors/formatters file, can't commit such changes, because "formatting war" other people on same project, use other editors json.
in idea settings->editor->code style->json
found these settings:
but looks nothing "empty object/array spaces".
so, question is: is possible change default empty object/array formatting in json intellij idea? may can patch formatter plugin or install other 1 json?
as per comment above, settings fine , can confirm on local 14.1.7 installation work expected.
but looks nothing "empty object/array spaces"
the settings showing, editor -> code style -> json -> spaces tab
looking for:
- the
braces
checkbox handles objects - the
brackets
checkbox handles arrays
you can add empty object/array in preview section on right, , try check/uncheck again 2 checkboxes see happens:
Comments
Post a Comment