]>
jfr.im git - irc/quakenet/qwebirc.git/blob - qwebirc/util/qjson.py
3 # first try the system module
4 import simplejson
as json
6 # try to see if the C module is available
13 # try python 2.6's json library as
14 # it is 2x as fast as simplejson with no C
17 json
.dumps
# we don't want the silly third party version
18 except (ImportError, AttributeError):
19 # fallback to the embedded
20 import esimplejson
as json
23 dumps
= lambda x
: json
.dumps(x
, encoding
="utf8", ensure_ascii
=True, check_circular
=False, indent
=None, separators
=__SEPS
)
24 loads
= lambda x
: json
.loads(x
, encoding
="utf8")