Skip to content

Commit b094c3d

Browse files
committed
Going back to a reStructuredText README
1 parent 2386c5a commit b094c3d

File tree

2 files changed

+30
-25
lines changed

2 files changed

+30
-25
lines changed

README.md renamed to README.rst

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# javaobj-py3
1+
javaobj-py3
2+
###########
23

34
python-javaobj is a python library that provides functions for reading and
45
writing (writing is WIP currently) Java objects serialized or will be
@@ -8,50 +9,54 @@ standard data interchange format in Java world.
89
javaobj module exposes an API familiar to users of the standard library
910
marshal, pickle and json modules.
1011

11-
## About this repository
12+
About this repository
13+
=====================
1214

1315
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+
`Google Code <http://code.google.com/p/python-javaobj/>`_ and now hosted on
17+
`GitHub <https://github.com/vbuell/python-javaobj>`_.
1618

1719
This fork intends to work both on Python 2.7 and Python 3.
1820

19-
## Features
21+
Features
22+
========
2023

2124
* Java object instance unmarshaling
2225
* Java classes unmarshaling
2326
* Primitive values unmarshaling
2427
* Automatic conversion of Java Collections to python ones
2528
(_HashMap_ => dict, _ArrayList_ => list, etc)
2629

27-
## Requirements
30+
Requirements
31+
============
2832

2933
* Python >= 2.7 or Python >= 3.2
3034
* Maven 2+ (for building test data of serialized objects.
3135
You can skip it if you do not plan to run tests.py)
3236

33-
## Usage
37+
Usage
38+
=====
3439

3540
Unmarshalling of Java serialised object:
3641

37-
```python
38-
import javaobj
42+
.. code-block:: python
3943
40-
jobj = self.read_file("obj5.ser")
41-
pobj = javaobj.loads(jobj)
42-
print pobj
43-
```
44+
import javaobj
45+
46+
jobj = self.read_file("obj5.ser")
47+
pobj = javaobj.loads(jobj)
48+
print(pobj)
4449
4550
Or, you can use Unmarshaller object directly:
4651

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-
```
52+
.. code-block:: python
53+
54+
import javaobj
55+
56+
marshaller = javaobj.JavaObjectUnmarshaller(open("sunExample.ser"))
57+
pobj = marshaller.readObject()
58+
59+
self.assertEqual(pobj.value, 17)
60+
self.assertTrue(pobj.next)
61+
62+
pobj = marshaller.readObject()

setup.py

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

0 commit comments

Comments
 (0)