• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

simeji/jid: json incremental digger

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

simeji/jid

开源软件地址:

https://github.com/simeji/jid

开源编程语言:

Go 100.0%

开源软件介绍:

jid

Circle CI

Json Incremental Digger

It's a very simple tool.
You can drill down JSON interactively by using filtering queries like jq.

Suggestion and Auto completion of this tool will provide you a very comfortable JSON drill down.

Demo

demo-jid-main

Installation

With HomeBrew (for macOS)

brew install jid

With MacPorts (for macOS)

sudo port install jid

With pkg (for FreeBSD)

pkg install jid

With scoop (for Windows)

scoop install jid

Other package management systems

Jid can install by package management systems of below OS.

Packaging status

Simply use "jid" command

If you simply want to use jid command, please download binary from below.

https://github.com/simeji/jid/releases

Build

go install github.com/simeji/jid/cmd/jid@latest

Usage

Quick start

simple json example

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.

simple json example2

This json is used by demo 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

With a initial query

First argument of jid is initial query. (Use JSON same as Demo)

demo-jid-with-query

with curl

Sample for using RDAP data.

curl -s http://rdg.afilias.info/rdap/domain/example.info | jid

Load JSON from a file

jid < file.json

Keymaps

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 (➡️) Move cursor a character to the right
CTRL + B / Left Arrow (⬅️) 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

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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap