I would like to use Python's JSON module. It was only introduced in Python 2.6 and I'm stuck with 2.5 for now. Is the particular JSON module provided with Python 2.6 available as a separate module that can be used with 2.5?
Thanks! There were so many json modules I wasn't sure which was the one used in Python 2.6.
marcog
2009-04-26 20:40:07
Way late here, but how can you write a script to import either json or simplejson depending on the installed python version?
Wells
2009-12-09 16:46:38
+1
A:
I prefer cjson since it's much faster: http://www.vazor.com/cjson.html
David
2009-04-27 05:03:22
I want to remain compatible with the default library provided with 2.6 though, otherwise I'd agree with you.
marcog
2009-04-27 05:58:07
+8
A:
To Wells and others:
Way late here, but how can you write a script to import either json or simplejson depending on the installed python version?
Here's how:
try:
import json
except ImportError:
import simplejson as json
pkoch
2010-01-22 18:41:57