Jsonalias is a microlibrary (current version 0.1.2) that defines a `Json` type alias for Python. It provides a convenient way to type-hint JSON-like structures, which are typically composed of nested dictionaries, lists, strings, numbers, booleans, and None. Given its singular purpose, the release cadence is expected to be slow, with updates primarily for compatibility or if the alias is integrated into Python's standard `typing` module.
pip install jsonaliasVerified import paths — ran on the pinned version, not inferred.
The `Json` type alias can be used to annotate variables, function parameters, and return types that are expected to conform to a JSON-like structure. It supports nested dictionaries, lists, and primitive JSON types.
Verify that `null` values from external JSON sources are correctly converted to Python's `None` type when loading data, typically handled automatically by `json.load()`/`json.loads()` from the standard library.
Monitor Python's `typing` module updates. If `typing.Json` becomes available, consider migrating to the standard library definition and updating `jsonalias` if necessary, or reviewing for any behavioral differences.
Install the library using pip: `pip install jsonalias`
Ensure you have mypy version 0.981 or newer, and run mypy with the flag: `mypy --enable-recursive-aliases your_file.py`
Add the import statement at the top of your Python file: `from jsonalias import Json`
No dependency data recorded yet.