diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-05-02 12:36:44 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-05-02 12:36:44 (GMT) |
commit | c6b607d4a9e4d60fb506034ce67fc89734bb68a7 (patch) | |
tree | b4f27e81ab25a9dfe6a97433f4d25c263b59f6cc /Lib/json/tool.py | |
parent | 7255f18556ae70fc28b563a345577d3ec8f6f0ba (diff) | |
download | cpython-c6b607d4a9e4d60fb506034ce67fc89734bb68a7.zip cpython-c6b607d4a9e4d60fb506034ce67fc89734bb68a7.tar.gz cpython-c6b607d4a9e4d60fb506034ce67fc89734bb68a7.tar.bz2 |
port simplejson upgrade from the trunk #4136
json also now works only with unicode strings
Patch by Antoine Pitrou; updated by me
Diffstat (limited to 'Lib/json/tool.py')
-rw-r--r-- | Lib/json/tool.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/json/tool.py b/Lib/json/tool.py index cec29b6..6d6558a 100644 --- a/Lib/json/tool.py +++ b/Lib/json/tool.py @@ -2,11 +2,11 @@ r"""Command-line tool to validate and pretty-print JSON Usage:: - $ echo '{"json":"obj"}' | python -mjson.tool + $ echo '{"json":"obj"}' | python -m json.tool { "json": "obj" } - $ echo '{ 1.2:3.4}' | python -mjson.tool + $ echo '{ 1.2:3.4}' | python -m json.tool Expecting property name: line 1 column 2 (char 2) """ @@ -24,7 +24,7 @@ def main(): infile = open(sys.argv[1], 'rb') outfile = open(sys.argv[2], 'wb') else: - raise SystemExit("{0} [infile [outfile]]".format(sys.argv[0])) + raise SystemExit(sys.argv[0] + " [infile [outfile]]") try: obj = json.load(infile) except ValueError as e: |