json-rm
This tool parses a JSON Schema into "Entities" and "Attributes", which correspond to tables and columns in a relational database. It can be used to output different representations of the data model described by the input schema.
Installation
pip install json-rm
Command line usage
jst <command> <schema_path>
Examples
Use the 'simple' formatter on a schema:
$ jst simple resources/schemas/1.2.246.537.6.1506.7000.2022.1.10.json
Use the 'postgres' formatter on a schema:
$ jst postgres resources/schemas/1.2.246.537.6.1506.7000.2022.1.10.json
Use the 'spark' formatter on a schema:
$ jst spark resources/schemas/1.2.246.537.6.1506.7000.2022.1.10.json
Using from your Python code
import json_rm
from json_rm.formatters import SimpleFormatter
schema = json_rm.JSONSchema.from_file("schema.json")
formatter = SimpleFormatter()
print(schema.render(formatter))
Parsing options
normalization
- Denormalized (default) mode results in a flat structure with less tables.
- Normalized mode results in a deep structure with more tables.
When normalization is set to False (default), the parser operates in "denormalized" mode, creating a new Entity only for the root object and repeating (array) objects. In the "normalized mode, a separate Entity is created for each nested structure (JSON objects and arrays).
Release files for json-rm 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| json-rm-0.0.2.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| json_rm-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / json-rm-0.0.2.tar.gz
| Download URL | json-rm-0.0.2.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ae75f05fd18ad88e5efd706a30667465040dc2c1023b4d674c79ddd8881cf09
|
|
BLAKE2b-256 checksum How to use checksums |
c8c441eb3663738b4fd4257b210e2f128ee1030e0518fefa550f819c21ade5bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Release files / json_rm-0.0.2-py3-none-any.whl
| Download URL | json_rm-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd663a96d722ee8d10d4872c06a34b820e86e8010274f9fd11ca561cd30ef2b4
|
|
BLAKE2b-256 checksum How to use checksums |
792a3c4db45dfcbd87d470e9378292118bb0ece55fb74719455f9e91f34ac7e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|