JSON-Explore
A lightweight CLI tool for interactively exploring JSON files and dictionaries.
Installation
Install using pip:
pip install json-explore
Import Instructions
import json_explore
Usage
import json_explore
json_example: dict = \
{"menu": {
"id": 29,
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}
print(f"Let's explore the above json using the json explore function")
print()
json_explore.json_explore_json(json_example)
print(f"Now lets explore the same json using the file path function")
print()
json_explore.json_explore_fp("test.json")
CLI example
json-explore path/to/your/file.json
Navigation
Enter a key name or an element number to navigate into a that json level Enter a ^ to navigate up Enter Q to quit
When at the top the JSON level name will be Top
Example
Q to quit
^ to go up
Type key string or element number to go into lower level
JSON level: Top dict:
menu: dict
:menu
JSON level: menu dict:
id: 29: <class 'int'>
value: File: <class 'str'>
popup: dict
:popup
JSON level: popup dict:
menuitem: list
:menuitem
JSON level: menuitem list:
Element: 0: dict
Element: 1: dict
Element: 2: dict
:1
JSON level: 1 dict:
value: Open: <class 'str'>
onclick: OpenDoc(): <class 'str'>
:^
JSON level: menuitem list:
Element: 0: dict
Element: 1: dict
Element: 2: dict
:^
JSON level: popup dict:
menuitem: list
:Q
Relase Notes
2.0.0 (Current)
- now works in the command line
- improved setup.py for pypi discriptions
- added more detailed README
Metadata
Release files for json-explore 2.0.1
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_explore-2.0.1.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| json_explore-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / json_explore-2.0.1.tar.gz
| Download URL | json_explore-2.0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ad71e85f4f302b0a66c4d2f2c79b11d0bcfcb067483758ef6066d81b91d0e82
|
|
BLAKE2b-256 checksum How to use checksums |
105b3366ee313356a4c8ba103f28f9489eecc103f6672a54ba0c5da9e459838b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / json_explore-2.0.1-py3-none-any.whl
| Download URL | json_explore-2.0.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18e83009ba2ccb38847a04dc52fe52d0cbdfc9fa351bd1b1f66fdaf18e3ba4fc
|
|
BLAKE2b-256 checksum How to use checksums |
656ab24a02a18025c2e00ed164c7b8fc1ce04e1ca8bced7e63b645ccb24e0efa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|