diff options
author | Bryan Newbold <bnewbold@archive.org> | 2019-12-18 14:53:33 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2019-12-18 14:53:35 -0800 |
commit | 1a45fe3f3ef3122355f49470fbbcd6dc82c959b2 (patch) | |
tree | 9f9e60c2814c91ad2b394c95b5ff5c9c9345d72d /python/grobid2json.py | |
parent | 0ea8bfb3485bc4db5cb7a17397d6c37f407a65b4 (diff) | |
download | sandcrawler-1a45fe3f3ef3122355f49470fbbcd6dc82c959b2.tar.gz sandcrawler-1a45fe3f3ef3122355f49470fbbcd6dc82c959b2.zip |
refactor: sort keys in JSON output
This makes debugging by tailing Kafka topics a lot more readable
Diffstat (limited to 'python/grobid2json.py')
-rwxr-xr-x | python/grobid2json.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/grobid2json.py b/python/grobid2json.py index 977c772..0d85e5e 100755 --- a/python/grobid2json.py +++ b/python/grobid2json.py @@ -177,7 +177,8 @@ def main(): # pragma no cover content = open(filename, 'r') print(json.dumps( teixml2json(content, - encumbered=(not args.no_encumbered)))) + encumbered=(not args.no_encumbered)), + sort_keys=True)) if __name__=='__main__': # pragma no cover main() |