Releases: vinitkumar/json2xml
json2xml 6.3.0
json2xml 6.3.0 and json2xml_rs 0.4.0
Released 2026-06-10.
Highlights
- Reduced allocation pressure in the pure Python serializer hot paths for dicts, lists, scalar values, XML names, and emitted attributes.
- Kept the Python and Rust release line aligned:
json2xml[fast]now requiresjson2xml-rs>=0.4.0. - Documented the Rust memory benchmark in enough detail to reproduce the 100,000-record RSS measurement and understand the throughput tradeoff.
Why Upgrade
This release is focused on large conversion workloads. The 6.2.0 Rust release moved accelerator output directly into Python bytes to reduce peak serializer memory; 6.3.0 follows that with Python-side allocation reductions so fallback and unsupported-option paths also benefit.
No XML shape changes are intended. Existing callers should see the same output for supported options, including invalid-name normalization, @attrs/@val handling, list wrapping, XPath mode, and pure Python fallback behavior.
Package Versions
- Python package:
json2xml==6.3.0 - Rust accelerator package:
json2xml-rs==0.4.0 - Fast install:
pip install "json2xml[fast]"
Changelog
feat: reduce pure Python serializer allocations in hot dict, list, and scalar paths.feat: preserve XML output semantics while reusing validated element-name and attribute work.perf: lower peak memory pressure for large conversions after the 6.2.0 Rust bytes-writer release.docs: add hyperfine Rust memory benchmark notes with reproduction details and the measured throughput tradeoff.chore: releasejson2xml-rs0.4.0 and require it fromjson2xml[fast]for accelerated installs.
Verification
The release changes are covered by the existing serializer, fast-backend, and Rust parity tests. The benchmark documentation records the measurement setup separately from the functional test suite so release consumers can reproduce performance results on their own hardware.
json2xml 6.2.0
json2xml 6.2.0
This release ships the serializer memory savings for both the pure Python package and the optional Rust accelerator.
Highlights
- Reduces peak memory in the pure Python rooted-output path by avoiding an intermediate output list.
- Reduces peak memory in
json2xml-rsby writing directly into Python bytes instead of materializing a large Rust string first. - Publishes
json2xml-rs0.3.0 and updatesjson2xml[fast]to requirejson2xml-rs>=0.3.0. - Updates the Rust extension crate to Rust 2024 with
rust-version = 1.96. - Fixes macOS
cargo testlinking by separating normal PyO3 tests from extension-module builds.
Memory benchmark
For the documented 100,000-record benchmark, the Rust serializer RSS delta dropped from 157.70 MiB to 80.26 MiB, saving 77.44 MiB, about 49.1%.
See docs/rust_memory_benchmark.rst for methodology and reproduction details.
Release order
json2xml-rs 0.3.0 was published first via rust-v0.3.0, then this json2xml 6.2.0 release was published so json2xml[fast] resolves cleanly.
v6.1.0
What's Changed
Full Changelog: v6.0.7...v6.1.0
v6.0.7
v6.0.6
What changed
- Fixed review cleanup and removed a needless line in the recent conversion and test cleanup (#281, #280)
- Added lat.md support to the codebase for architecture and test knowledge tracking (#279)
- Bumped the docs dependency pygments from 2.19.1 to 2.20.0 (#278)
- Upgraded the Python workflow to 3.12
Rust release
- No new json2xml-rs release was published for 6.0.6
- There were no commits under rust/ since rust-v0.2.0, so no new Rust tag was needed
Full changelog
v6.0.5
What changed
- Fixed double-escaping of XML attribute values for invalid key names
- Fixed Rust backend float formatting to match Python output
- Fixed iteration errors being swallowed in the Rust backend
- Validated
custom_rootas a proper XML element name - Reduced Rust writer allocations and removed duplicated dispatch logic
- Bumped
pyo3and Rust binding versions - Added the missing
xmltodictdependency to the Rust CI workflow
Full changelog
Cleanup Deps
Full Changelog: v6.0.3...v6.0.4
Fixes #273
Cleanup deps
What's Changed
- feat(rust): make PyO3 optional to fix Python 3.14 fuzz linking by @vinitkumar in #270
- Add rust tests by @vinitkumar in #271
Full Changelog: v6.0.2...v6.0.3
Security patch release
What's Changed
- Update README.rst by @vinitkumar in #268
- fix: upgrade urllib3 to patched version by @vinitkumar in #269
Full Changelog: v6.0.1...v6.0.2
v6.0.1 - Easy Rust Installation & Updated Benchmarks
json2xml v6.0.1
This release enables the [fast] optional dependency and includes comprehensive benchmark comparisons.
🚀 Easy Rust Acceleration
You can now install json2xml with Rust acceleration in a single command:
pip install json2xml[fast]This automatically installs both json2xml and json2xml-rs.
📊 Comprehensive Benchmark Results
Tested on Apple Silicon, comparing all implementations:
Performance Summary
| Test Case | Python | Rust | Go | Zig |
|---|---|---|---|---|
| Small (47B) | 40.12µs | 1.45µs | 4.65ms | 3.74ms |
| Medium (3.2KB) | 2.14ms | 71.28µs | 4.07ms | 3.28ms |
| Large (32KB) | 21.08ms | 739.89µs | 4.05ms | 6.11ms |
| Very Large (323KB) | 212.61ms | 7.55ms | 4.38ms | 33.24ms |
Speedup vs Pure Python
| Test Case | Rust | Go | Zig |
|---|---|---|---|
| Small (47B) | 27.6x | 0.0x* | 0.0x* |
| Medium (3.2KB) | 30.0x | 0.5x* | 0.7x* |
| Large (32KB) | 28.5x | 5.2x | 3.5x |
| Very Large (323KB) | 28.2x | 48.5x | 6.4x |
*CLI tools have ~3-4ms process spawn overhead
Key Findings
- Rust is best for Python users - ~28x faster with zero overhead
- Go excels for large CLI workloads - 48x faster for 300KB+ files
- CLI startup overhead matters - Go/Zig slower for small files due to process spawn
📦 Installation Options
# Pure Python (always works)
pip install json2xml
# With Rust acceleration (recommended)
pip install json2xml[fast]🔗 Related Projects
- Go version: json2xml-go
- Zig version: json2xml-zig
- Rust extension: json2xml-rs
What's Changed
- Enable
[fast]optional dependency for easy Rust installation - Add comprehensive
benchmark_all.pyscript - Update
BENCHMARKS.mdwith Python/Rust/Go/Zig comparison
Full Changelog: v6.0.0...v6.0.1