> I am using the Jython 2.5.3 PythonInterpreter

> String scriptA = "import json"; // "import datetime" fails as well

> [java] ImportError: No module named json

An important point to note is that there is no json module in jython 2.5, because it was not introduced into cpython until 2.6.

So jython 2.7 has a json module.

If you cannot move to 2.7, I published a jython specific json module, called Jyson, which has a very similar interface to the json module.


Which will be much faster then the json module, on both 2.5 and 2.7, since it is written in native java.