Skip to main content

A lightweight CLI tool for interactively exploring JSON files and dictionaries.

Project description

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

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

json_explore-2.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json_explore-2.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file json_explore-2.0.1.tar.gz.

File metadata

  • Download URL: json_explore-2.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for json_explore-2.0.1.tar.gz
Algorithm Hash digest
SHA256 8ad71e85f4f302b0a66c4d2f2c79b11d0bcfcb067483758ef6066d81b91d0e82
MD5 25d7000eff3cc4591752f3072d4525e7
BLAKE2b-256 105b3366ee313356a4c8ba103f28f9489eecc103f6672a54ba0c5da9e459838b

See more details on using hashes here.

File details

Details for the file json_explore-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: json_explore-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for json_explore-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18e83009ba2ccb38847a04dc52fe52d0cbdfc9fa351bd1b1f66fdaf18e3ba4fc
MD5 14759a582750b1ecbbde7b45da09c59c
BLAKE2b-256 656ab24a02a18025c2e00ed164c7b8fc1ce04e1ca8bced7e63b645ccb24e0efa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page