14 Commits

Author SHA1 Message Date
b95dcad616 Fixups 2017-03-20 08:24:58 -07:00
543c5c7e1a Add an option to disable ensure_ascii 2017-03-20 20:19:01 +08:00
9cee71b5df Add pyupgrade 2017-03-12 18:01:29 -07:00
84b1fb6827 let pre-commit fix some stuff 2016-11-03 15:54:48 -07:00
c7ab197645 don't need to blow away the space here 2016-11-03 15:49:04 -07:00
d06a515ce1 this is much cleaner and might actually get all the coverage with out a bunch of work 2016-11-03 15:47:21 -07:00
845a3d5bdf adds top keys list of keys in hashes to put at the top of a hash
This adds custom sorting to preferencially add a list of top keys
at the start of any json hash in the json document
2016-11-03 09:41:23 -07:00
abaf0d12de Fix exc. raising logic to match validation issues 2016-06-13 11:34:55 +02:00
a5628863e8 Refactor legacy indent: int -> indent: str
The type of `indent` parameter is preferably `str`. See
http://simplejson.readthedocs.io/en/latest/index.html?highlight=dump#simplejson.dump
. This change allows to specify TABs as indentation delimiter to
`pretty_format_json`. Add input validator/converter for backward compat.
2016-06-12 19:19:07 +02:00
17478a0a50 Style fixups 2016-04-14 08:25:52 -07:00
f775891717 Drop messy py26 support in favour of 100% coverage 2016-04-14 11:16:18 +01:00
700b18ed0e Use OrderedDict to preserve order 2016-04-14 10:23:42 +01:00
f769c208bc Addding no-sort-keys to pretty_format_json, this allows to disable the sort on the keys 2016-03-12 17:04:33 -05:00
55bf22dc4a Add new hook pretty-format-json
This new hook allows to standardize one's JSON files (sorted key/4
spaces indent).
By default it just fails if any file is not complying with the standard,
but you can also pass the arg `--autofix` and the hook will
pretty-format the file itself.

Good in use combined with the `check-json` hook.
2015-06-11 00:08:03 -04:00