Add forceformat option #27

merged 3 commits into from Dec 16, 2012


None yet
2 participants

lroggendorff commented Sep 14, 2012


Using, I got used to the behavior that it goes ahead and formats the source even if errors are found. When I started using the jsonlint cli, I noticed that behavior was missing. It seemed like it might be nice to include, so I thought I'd give it a shot. I've just taken Chris Dary's char-by-char formatter and inserted it. I'm hoping that's cool, or that you and he can work it out one way or the other. :)

Also, while working on this, I noticed a variable name wasn't updated properly in cli.js. That change is included in this PR, or I've also created a branch specifically for that change, so I could send a separate PR if you'd rather.


lroggendorff added some commits Sep 13, 2012

@lroggendorff lroggendorff Fixing variable name when overwriting input file.
It looks like at one time the variable referencing the input file was
'path', and later on it was changed to 'json', but the if
(options.inplace) block was never updated.
@lroggendorff lroggendorff Adding forceformat option: format invalid output just like
When using, even invalid JSON is pretty printed. It seemed
like a good option to have in the cli version as well. This is simply
inserting the char-by-char formatter from and adding an option to cli.js.
@lroggendorff lroggendorff Merge branch 'fix-inplace-overwriting' into add-forceformat-option
* fix-inplace-overwriting:
  Fixing variable name when overwriting input file.

@zaach zaach added a commit that referenced this pull request Dec 16, 2012

@zaach zaach Merge pull request #27 from lroggendorff/add-forceformat-option
Add forceformat option

@zaach zaach merged commit 79b553f into zaach:master Dec 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment