Using json from Jython
I recently tried to use json from Jython. In CPython, there is a json module which is part of the standard library. However, this was only introduced in python 2.6. The most recent stable version of Jython is 2.5.1 however and it does not know a
json module out of the box.
Fortunately, I came across jyson (http://opensource.xhaus.com/projects/show/jyson) which is a pure Java implementation of a json reader/writer. Although the code lives in its own name space, it seems that one can get the basic functionality (
json.dumps) equivalent to the CPython json module by doing:
import com.xhaus.jyson.JysonCodec as json