>>> import simplejson
Traceback (most recent call last):
File "
", line 1, in
ImportError: No module named simplejson
>>> import simplejson ?
File "
", line 1
import simplejson ?
^
SyntaxError: invalid syntax
>>> import json as simplejson
>>> help(json)
Help on package json:
NAME
json - A simple, fast, extensible JSON encoder and decoder
FILE
/usr/lib64/python2.6/json/__init__.py
DESCRIPTION
JSON (JavaScript Object Notation) is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
json exposes an API familiar to uses of the standard library
marshal and pickle modules.
Encoding basic Python object hierarchies::
>>> import json
>>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
'["foo", {"bar": ["baz", null, 1.0, 2]}]'
>>> print json.dumps("\"foo\bar")
"\"foo\bar"
>>> print json.dumps(u'\u1234')
"\u1234"