A JSON file data viewer using pure python
Project description
PyJSONViewer
A JSON file data viewer using pure python
Mac OS
Windows10
CentOS
What is this?
This is a JSON file data viewer based on python.
It only uses build-in libraries of python (tkinter, json).
Features:
Minimum dependency.
Multi-platform (Mac, Windows, Linux).
Easy to use.
Requirements
Python 3.6.x or higher
Download
$ pip install PyJSONViewer
or download as zip.
How to use
Bash alias setting
If you add this alias settting in your .bashrc
alias pyjsonviewer=‘python -m pyjsonviewer’
you can use this tool with just typing “pyjsonviewer” in your bash.
Selct JSON file with CUI.
Run pyjsonviewer with -f option and the path to a JSON file:
$ pyjsonviewer -f path_to_json_file/sample.json
JSON data tree will be shown.
Select JSON file with GUI.
Run pyjsonviewer
$ pyjsonviewer
File->Open and then select json file.
JSON data tree will be shown.
You can set initial directory:
$ pyjsonviewer -d path_to_json_file_dir
Select JSON file from history.
Run pyjsonviewer.py
File->“Open from history” and then double click a json file path from the list.
JSON data tree will be shown.
Select JSON file with drag and drop.
Run pyjsonviewer.py with the option -o
$ python pyjsonviewer.py -o path_to_json_file_dir
File browser is shown.
You can drag and drop a JSON file to the file browser.
Vimrc setting
If you are a vim user, you can set this command in your vimrc.
"JSON format function! JsonFormat() %!python -m json.tool endfunction command! JsonFormat :call JsonFormat() "JSON viewer function! JsonViewer() "%!python -m pyjsonviewer -f % > /dev/null let filename = expand('%') let s:job = job_start( \ ["/bin/sh", "-c", "python -m pyjsonviewer -f".filename],{}) endfunction command! JsonViewer :call JsonViewer()
When you are editing a json file with vim,
you can open it using PyJSONViewer with
: JSONViewer()
You can also format json file with
: JSONFormat()
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file PyJSONViewer-1.1.0.tar.gz
.
File metadata
- Download URL: PyJSONViewer-1.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e9fec446397627478de1cd111384a00f4b140301c96986a424b5265b5ba7363 |
|
MD5 | 24e12cbc2a4fd4ba79d6996f31427cfb |
|
BLAKE2b-256 | 9c742ba38d4e2956025f163878b6a6e8db68ee1103df2e839e06d70606200f29 |