Production-grade Infor OAGIS BOD to Flattened JSON converter.
Project description
BODtoJSON v1.0.0
BODtoJSON is an enterprise-grade Python library designed to transform complex Infor OAGIS (XML) Business Object Documents into modern, AI-ready flattened JSON structures.
v1.0.0 represents a significant leap from the 0.0.x series, moving from a utility script to a stable, commercialized data asset.
🚀 What’s New in v1.0.0 (vs. v0.0.7)
The transition from v0.0.7 to v1.0.0 is more than a version bump; it is a complete architectural refactor:
src/Layout Adoption: Migrated from a flat directory to the professionalsrc/layout.- Strategic Verb Stripping: Unlike v0.0.7, which often included administrative noise, v1.0.0 intelligently isolates the Noun (e.g.,
PurchaseOrder) and removes the Verb (e.g.,Sync). This creates a cleaner dataset for LLM ingestion. - Defensive XML Engine: * Namespace Neutralization: v1.0.0 uses dynamic regex to strip primary namespaces automatically.
- BOM Handling: Added support for UTF-8 Byte Order Marks to prevent "Invalid Token" errors common in ERP exports.
- Consolidated API: The interface has been simplified. You no longer need to navigate deep submodules; simply use
from BODtoJSON import convert.
📈 Why it is Better & Improved
| Feature | Legacy (v0.0.7) | Production (v1.0.0) |
|---|---|---|
| Data Integrity | Basic key-value mapping | Preserves Attributes (_@) and Values (_#text) |
| AI Readiness | Nested dictionaries (hard to index) | Fully Flattened (Perfect for Vector DBs) |
| Stability | Prone to XML namespace errors | Resilient to OAGIS schema variations |
| Deployment | Manual script copying | Standardized Wheel/Source distribution |
🛠️ Installation
pip install BODtoJSON
📂 Project Structure
BODtoJSON/
├── src/
│ └── BODtoJSON/
│ ├── __init__.py # Version & API exposure
│ └── mapper.py # Core Transformation Engine
├── tests/
│ ├── config.py # OAGIS XML Test Samples
│ └── test_mapper.py # Automated Unit Tests (unittest)
├── scripts/
│ └── inspect_payload.py # Manual Business Validation Utility
├── pyproject.toml # Modern Build Configuration
└── README.md
🧪 Validation & Testing
1. Automated Testing (QA)
To run the standardized test suite and verify engine logic:
python -m unittest discover tests
2. Manual Payload Inspection (UAT)
To verify the commercial value of the output and inspect the flattened JSON:
python scripts/inspect_payload.py
This script generates an inspection_result.json in the root directory for side-by-side audit with the original XML.
💻 Code Example
from BODtoJSON import convert
# Sample OAGIS XML
xml_input = """<SyncPurchaseOrder>...</SyncPurchaseOrder>"""
# High-fidelity conversion
# Strips 'Sync' verb, flattens 'PurchaseOrder' noun
flattened_json = convert(xml_input, verb="Sync")
print(flattened_json)
🤝 Commercial Value
By normalizing complex ERP structures into flat, labeled JSON, BODtoJSON reduces the engineering overhead of AI data preparation by up to 90%. It is built to be a stable foundation for forward-thinking AI strategies and automated business intelligence.
Author: Niraj Kakodkar
License: MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bodtojson-1.0.0.tar.gz.
File metadata
- Download URL: bodtojson-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73c0fa7a96a3cf255db219417492f1bab40a3e29fddf5bc2a7d5c5eb6c331a56
|
|
| MD5 |
19bef24f695017ef85a23ea1c78239e0
|
|
| BLAKE2b-256 |
e2dd61f215e7ddfee4aed19fe3788ad47def9ab234a9bb33417bddc3197399c9
|
File details
Details for the file bodtojson-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bodtojson-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34481743ed38863e3f6e239065c1cbdaea63d1f5ae3d51af8c183a2566f71680
|
|
| MD5 |
fe92a7306abe1eed475d8a8814709841
|
|
| BLAKE2b-256 |
89b2623800d696fd2a2d98611ca887413276ede2150dd3e045aa648a6591e053
|