Skip to content

Commit 8a5b84d

Browse files
committed
Updated README to match the one from the original project
Also added a link to the GitHub repository of the project
1 parent 567311d commit 8a5b84d

File tree

3 files changed

+58
-23
lines changed

3 files changed

+58
-23
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# javaobj-py3
2+
3+
python-javaobj is a python library that provides functions for reading and
4+
writing (writing is WIP currently) Java objects serialized or will be
5+
deserialized by _ObjectOutputStream_. This form of object representation is a
6+
standard data interchange format in Java world.
7+
8+
javaobj module exposes an API familiar to users of the standard library
9+
marshal, pickle and json modules.
10+
11+
## About this repository
12+
13+
This project is a fork of python-javaobj by Volodymyr Buell, originally from
14+
[Google Code](http://code.google.com/p/python-javaobj/) and now hosted on
15+
[GitHub](https://github.com/vbuell/python-javaobj).
16+
17+
This fork intends to work both on Python 2.7 and Python 3.
18+
19+
## Features
20+
21+
* Java object instance unmarshaling
22+
* Java classes unmarshaling
23+
* Primitive values unmarshaling
24+
* Automatic conversion of Java Collections to python ones
25+
(_HashMap_ => dict, _ArrayList_ => list, etc)
26+
27+
## Requirements
28+
29+
* Python >= 2.6, but < 3.0 (porting to 3.0 is in progress)
30+
* Maven 2+ (for building test data of serialized objects.
31+
You can skip it if you do not plan to run tests.py)
32+
33+
## Usage
34+
35+
Unmarshalling of Java serialised object:
36+
37+
```python
38+
import javaobj
39+
40+
jobj = self.read_file("obj5.ser")
41+
pobj = javaobj.loads(jobj)
42+
print pobj
43+
```
44+
45+
Or, you can use Unmarshaller object directly:
46+
47+
```python
48+
import javaobj
49+
50+
marshaller = javaobj.JavaObjectUnmarshaller(open("sunExample.ser"))
51+
pobj = marshaller.readObject()
52+
53+
self.assertEqual(pobj.value, 17)
54+
self.assertTrue(pobj.next)
55+
56+
pobj = marshaller.readObject()
57+
```

README.rst

Lines changed: 0 additions & 22 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def read(fname):
6767
keywords="python java marshalling serialization",
6868
py_modules=['javaobj'],
6969
test_suite="tests.tests",
70-
long_description=read('README.rst'),
70+
long_description=read('README.md'),
7171
classifiers=[
7272
"Development Status :: 3 - Alpha",
7373
"License :: OSI Approved :: Apache Software License",

0 commit comments

Comments
 (0)