You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to use jsonfmt as my equalprg filter for JSON files in Vim so I can reindent a file with a simple ==. However, if the file is malformed (eg. a hand-edited JSON file where I neglected to remove an extra comma after reordering a list), then that'll result in the JSON in my Vim buffer being replaced with jsonfmt's panic message.
As you might guess, this also makes it completely unsuitable for automatic format-on-save.
Would you be willing to consider something like a command-line switch which causes it to echo out the input unchanged and without any error messages if serde_json fails to parse the input?
The text was updated successfully, but these errors were encountered:
I like to use jsonfmt as my
equalprg
filter for JSON files in Vim so I can reindent a file with a simple==
. However, if the file is malformed (eg. a hand-edited JSON file where I neglected to remove an extra comma after reordering a list), then that'll result in the JSON in my Vim buffer being replaced with jsonfmt's panic message.As you might guess, this also makes it completely unsuitable for automatic format-on-save.
Would you be willing to consider something like a command-line switch which causes it to echo out the input unchanged and without any error messages if
serde_json
fails to parse the input?The text was updated successfully, but these errors were encountered: