[PATCH] D93528: [clang-format] Add basic support for formatting JSON
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 22 00:31:11 PDT 2021
MyDeveloperDay marked an inline comment as done.
MyDeveloperDay added inline comments.
================
Comment at: clang/docs/ReleaseNotes.rst:284
+- Basic Support has been adding for Formatting .json files (with very limited options)
+
----------------
curdeius wrote:
> Maybe instead of putting "with very limited options", you may add a link to the doc describing limitations?
This new strategy actually gives us lots of pre-existing options, for example:
using `TabWidth` and `UseTab` we can tabify/de-tabify the json
using `SpacesInContainerLiterals` we can control if the json is `["foo"]` or `[ "foo" ]`
Any option that can be used to format the javascript:
`x = { ... } `
can be used to format the JSON, I believe this gives us the best of both worlds, and some flexibility for the future if people want to format JSON in a specific BraceWrapping style.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93528/new/
https://reviews.llvm.org/D93528
More information about the cfe-commits
mailing list