@@ -34,6 +34,17 @@ This project is a fork of *python-javaobj* by Volodymyr Buell, originally from
3434
3535This fork intends to work both on Python 2.7 and Python 3.4+.
3636
37+ Compatibility warning: New version of the parser
38+ ------------------------------------------------
39+
40+ Since version 0.4.0, two implementations of the parser are available:
41+
42+ * `v1 `: the *classic * implementation of `javaobj `, with a work in progress
43+ implementation of a writer.
44+ * `v2 `: the *new * implementation, a port of `jdeserialize ` with support of the
45+ object transformer (with a new API) and the numpy arrays.
46+
47+
3748Compatibility Warning: object transformer
3849-----------------------------------------
3950
@@ -66,11 +77,12 @@ Requirements
6677============
6778
6879* Python >= 2.7 or Python >= 3.4
80+ * `enum34 ` and `typing ` when using Python <= 3.4 (installable with `pip `)
6981* Maven 2+ (for building test data of serialized objects.
7082 You can skip it if you do not plan to run ``tests.py ``)
7183
72- Usage
73- =====
84+ Usage (V1 implementation)
85+ =========================
7486
7587Unmarshalling of Java serialised object:
7688
@@ -98,3 +110,29 @@ Or, you can use Unmarshaller object directly:
98110 print (pobj.next, " should be" , True )
99111
100112 pobj = marshaller.readObject()
113+
114+
115+ The objects and methods provided by `javaobj ` module are shortcuts to the
116+ `javaobj.v1 ` package
117+
118+
119+ Usage (V2 implementation)
120+ =========================
121+
122+ Unmarshalling of Java serialised object:
123+
124+ .. code-block :: python
125+
126+ import javaobj.v2 as javaobj
127+
128+ with open (" obj5.ser" , " rb" ) as fd:
129+ jobj = fd.read()
130+
131+ pobj = javaobj.loads(jobj)
132+ print (pobj)
133+
134+
135+ Object Transformer
136+ -------------------
137+
138+ WIP
0 commit comments