Author techtonik
Recipients techtonik
Date 2012-11-24.23:18:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za>
In-reply-to
Content
Awesome json tool doesn't work anymore in Python 3 (needs tests?).
http://stackoverflow.com/questions/352098/how-to-pretty-print-json-script

C:\Python27>python -m json.tool stdlibx.json
{
    "distutils": [
        "Doc/distutils",
        "Lib/distutils",
        "Lib/test/test_distutils.py"
    ],
    "json": [
        "Doc/library/json.rst",
        "Lib/json",
        "Lib/test/json_tests",
        "Lib/test/test_json.py"
    ]
}

C:\Python33>python -m json.tool stdlibx.json
Traceback (most recent call last):
  File "C:\Python33\lib\runpy.py", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python33\lib\runpy.py", line 73, in _run_code
    exec(code, run_globals)
  File "C:\Python33\lib\json\tool.py", line 37, in <module>
    main()
  File "C:\Python33\lib\json\tool.py", line 29, in main
    obj = json.load(infile)
  File "C:\Python33\lib\json\__init__.py", line 264, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "C:\Python33\lib\json\__init__.py", line 309, in loads
    return _default_decoder.decode(s)
  File "C:\Python33\lib\json\decoder.py", line 352, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: can't use a string pattern on a bytes-like object
History
Date User Action Args
2012-11-24 23:19:00techtoniksetrecipients: + techtonik
2012-11-24 23:19:00techtoniksetmessageid: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za>
2012-11-24 23:19:00techtoniklinkissue16549 messages
2012-11-24 23:19:00techtonikcreate