2 # Tries to import the best JSON module available
9 # UltraJSON should be the fastest
11 # https://github.com/esnme/ultrajson
12 # http://pypi.python.org/pypi/ujson/
14 JSONDecodeError
= ValueError
17 print('ujson not found', file=sys
.stderr
)
20 # If SimpleJSON is installed separately, it might be a recent version
21 import simplejson
as json
22 JSONDecodeError
= json
.JSONDecodeError
25 print('simplejson not found', file=sys
.stderr
)
27 # Otherwise use json from the stdlib
29 JSONDecodeError
= ValueError