╭─mindcat@mindcat-linux-pc ~/workspace/tools/人民币大写 ‹ master*›
╰─➤ echo '{, "code":233}' | js-beautify 127 ↵
{, "code": 233
}% ╭─mindcat@mindcat-linux-pc ~/workspace/tools/人民币大写 ‹ master*›
╰─➤ python2
Python 2.7.12 (default, Jun 28 2016, 08:31:05)
[GCC 6.1.1 20160602] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import simplejson as json
>>> json.loads('{, "code":233}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/simplejson/
__init__.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/site-packages/simplejson/
decoder.py", line 374, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python2.7/site-packages/simplejson/
decoder.py", line 404, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
>>>