| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
python-javaobj is a python library that provides functions for reading and writing (writing is WIP currently) Java objects serialized or will be deserialized by ObjectOutputStream. This form of object representation is a standard data interchange format in Java world.
javaobj module exposes an API familiar to users of the standard library marshal, pickle and json modules.
Unmarshalling of Java serialised object:
import javaobj
jobj = self.read_file("obj5.ser")
pobj = javaobj.loads(jobj)
print pobjOr, you can use Unmarshaller object directly:
import javaobj
marshaller = javaobj.JavaObjectUnmarshaller(open("sunExample.ser"))
pobj = marshaller.readObject()
self.assertEqual(pobj.value, 17)
self.assertTrue(pobj.next)
pobj = marshaller.readObject()| Back | FazBrowse Home | New Git URL |