merge json library with simplejson 2.0.9 (issue 4136)

This commit is contained in:
Bob Ippolito 2009-03-17 23:19:00 +00:00
parent 277859d591
commit d914e3f861
13 changed files with 2430 additions and 582 deletions

View file

@ -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, e: