skillfed

javaobj-py3

Module for serializing and de-serializing Java objects.

javaobj-py3 v0.6.1 900.2K downloads/30d#4,777 on PyPI84
Permissive license Apache-2.0 Active released

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-py3

uv

uv add javaobj-py3

poetry

poetry add javaobj-py3

Installing 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

Development Status :: 3 - AlphaOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

java object deserializationjava serialization pythonread java .ser filesjava object unmarshallingjava to python objectsobjectoutputstream parserjava serialized data
java-interopserialization

More Python Modules packages