- Notifications
You must be signed in to change notification settings - Fork156
simeji/jid
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Json Incremental Digger
It's a very simple tool.
You can drill down JSON interactively by using filtering queries likejq.
Suggestion andAuto completion of this tool will provide you a very comfortable JSON drill down.
- With HomeBrew (for macOS)
- With MacPorts (for macOS)
- With pkg (for FreeBSD)
- With scoop (for Windows)
- Other package management system
- Simply use "jid" command
- Build
brew install jid
sudo port install jid
pkg install jid
scoop install jid
Jid can install by package management systems of below OS.
If you simply want to usejid
command, please download binary from below.
https://github.com/simeji/jid/releases
go install github.com/simeji/jid/cmd/jid@latest
Please execute the below command.
echo '{"aa":"2AA2","bb":{"aaa":[123,"cccc",[1,2]],"c":321}}'| jid
then, jid will be running.
You can dig JSON data incrementally.
When you enter.bb.aaa[2]
, you will see the following.
[Filter]> .bb.aaa[2][ 1, 2]
Then, you press Enter key and output[1,2]
and exit.
This json is used bydemo section.
echo '{"info":{"date":"2016-10-23","version":1.0},"users":[{"name":"simeji","uri":"https://github.com/simeji","id":1},{"name":"simeji2","uri":"https://example.com/simeji","id":2},{"name":"simeji3","uri":"https://example.com/simeji3","id":3}],"userCount":3}}'|jid
First argument ofjid
is initial query.(Use JSON same asDemo)
Sample for usingRDAP data.
curl -s http://rdg.afilias.info/rdap/domain/example.info | jid
jid < file.json
key | description |
---|---|
TAB /CTRL +I | Show available items and choice them |
CTRL +W | Delete from the cursor to the start of the word |
CTRL +U | Delete whole query |
CTRL +F / Right Arrow (:arrow_right:) | Move cursor a character to the right |
CTRL +B / Left Arrow (:arrow_left:) | Move cursor a character to the left |
CTRL +A | To the first character of the 'Filter' |
CTRL +E | To the end of the 'Filter' |
CTRL +J | Scroll json buffer 1 line downwards |
CTRL +K | Scroll json buffer 1 line upwards |
CTRL +G | Scroll json buffer to bottom |
CTRL +T | Scroll json buffer to top |
CTRL +N | Scroll json buffer 'Page Down' |
CTRL +P | Scroll json buffer 'Page Up' |
CTRL +L | Change view mode whole json or keys (only object) |
ESC | Hide a candidate box |
option | description |
---|---|
First argument ($1) | Initial query |
-h | print a help |
-help | print a help |
-version | print the version and exit |
-q | Output query mode (for jq) |
-M | monochrome output mode |
About
json incremental digger
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published