Archive for July, 2010

Using json from Jython

Posted on July 31, 2010. Filed under: Uncategorized | Tags: , , , , , |

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 ( 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.loads and json.dumps) equivalent to the CPython json module by doing:

import com.xhaus.jyson.JysonCodec as json

Read Full Post | Make a Comment ( 2 so far )

Liked it here?
Why not try sites on the blogroll...