javaobj-py3
Module for serializing and de-serializing Java objects.
What it is and what it does
javaobj-py3 is a library for reading and writing Java objects serialized in Java's ObjectOutputStream format. It provides three parser implementations (v1, v2, v3) with different trade-offs: v1 offers basic marshalling and compatibility back to Python 2.7; v2 adds object transformers and numpy array support for Python 3.4+; v3 is a full rewrite for Python 3.12+ with complete read and write support and stricter safety limits. The library automatically converts Java collections to Python equivalents (HashMap to dict, ArrayList to list) and handles GZipped streams transparently.
The package exposes a familiar API modeled on pickle and json, so developers accustomed to those modules will recognize the load/loads pattern. It is primarily used when Python code needs to interoperate with Java systems that exchange data via serialized objects—a common pattern in enterprise environments. The choice of parser depends on your Python version and whether you need marshalling (writing) capability.
Use it for:
- Deserialize Java objects from legacy enterprise systems into Python for data analysis or migration.
- Read Java serialized data files (.ser) produced by Java applications without reimplementing the format.
- Interoperate with Java microservices or batch jobs that output ObjectOutputStream-serialized payloads.
- Convert Java collections (HashMap, ArrayList, etc.) to native Python types for downstream processing.
- Implement bidirectional data exchange with Java systems using v3's full read-write support on Python 3.12+.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads and writes Java objects serialized by ObjectOutputStream, converting them to and from Python equivalents with an API familiar to pickle and json users.
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and fills a genuine niche: Java object deserialization is not a common need, but when it is required, few alternatives exist. The permissive Apache-2.0 license and broad Python version support (2.7 through 3.14) make it safe to adopt. Choose v1 or v2 for older Python versions, v3 for new projects on Python 3.12+.
Install
javaobj-py3 on PyPI
pip
pip install javaobj-py3uv
uv add javaobj-py3poetry
poetry add javaobj-py3Installing javaobj-py3
Before you install
Low friction: pure Python wheel with only enum34 and typing as runtime dependencies (both backports for older Python versions). Repository is active with a recent release and 84 stars; maintenance status is current.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
import javaobj
with open("obj.ser", "rb") as fd:
pobj = javaobj.loads(fd.read())
print(pobj)
Requires a Java-serialized binary file (.ser); v3 parser requires Python 3.12+, while v1 and v2 work on Python 2.7 and 3.4+.
Verify before relying
- Whether numpy integration (mentioned for v2) is automatically available or requires separate installation.
- Performance characteristics when parsing large or deeply nested Java object graphs.
- Real-world compatibility with modern Java serialization formats and custom Java classes.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — enum34, typing |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 900,200/month — #4,777 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: javaobj_py3-0.6.1-py2.py3-none-any.whl
Keywords: python, java, marshalling, serialization
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
jsonpicklejsonpickle converts complex Python objects to…
permissive · top 5,000 on PyPI
databind.jsonDeserializes and serializes Python dataclasses…
permissive · top 15,000 on PyPI
databindDatabind deserializes JSON-like nested data…
permissive · top 15,000 on PyPI
pemjaPemJa enables Python code to call Java methods…
permissive · top 15,000 on PyPI
py4jPy4J enables Python programs to dynamically…
permissive · top 1,000 on PyPI
numpyencoderProvides a custom JSON encoder class that…
permissive · top 15,000 on PyPI
py-serializableSerializes and deserializes Python classes to…
permissive · top 1,000 on PyPI
databind.coreDeserializes and serializes Python dataclasses…
permissive · top 15,000 on PyPI
pyjlsReads and writes JLS (Joulescope) files, a…
permissive · top 15,000 on PyPI
pyghidraPyGhidra provides native CPython 3 access to…
permissive · top 15,000 on PyPI