Convert Figma logo to code with AI

simeji logojid

json incremental digger

6,874
155
6,874
18

Top Related Projects

30,342

Command-line JSON processor

18,987

Terminal JSON viewer & processor

13,829

Make JSON greppable!

7,116

Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.

12,086

yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor

1,970

JSON Stream Editor (command line utility)

Quick Overview

jid (JSON Incremental Digger) is a command-line tool that allows users to interactively explore and query JSON data. It provides a real-time filtering interface, enabling users to drill down into complex JSON structures quickly and efficiently.

Pros

  • Interactive and user-friendly interface for exploring JSON data
  • Real-time filtering and preview of results
  • Supports various input methods, including stdin, files, and URLs
  • Lightweight and fast performance

Cons

  • Limited to JSON data format only
  • May have a learning curve for users unfamiliar with command-line tools
  • Lacks advanced features like data manipulation or transformation
  • Not suitable for processing very large JSON files due to memory constraints

Getting Started

To install jid, you can use one of the following methods:

  1. Using Homebrew (macOS):
brew install jid
  1. Using Go:
go install github.com/simeji/jid/cmd/jid@latest
  1. Download a pre-built binary from the releases page.

Basic usage:

echo '{"foo": {"bar": "baz"}}' | jid

Or with a JSON file:

jid < file.json

Once in the jid interface, you can start typing to filter the JSON data interactively. Press Enter to apply the filter, and Ctrl+C to exit and output the result.

Competitor Comparisons

30,342

Command-line JSON processor

Pros of jq

  • More powerful and feature-rich JSON processing capabilities
  • Extensive documentation and wider community support
  • Cross-platform compatibility (works on Unix-like systems and Windows)

Cons of jq

  • Steeper learning curve due to its complex syntax and features
  • Lacks interactive mode for real-time JSON exploration

Code Comparison

jq example:

echo '{"name": "John", "age": 30}' | jq '.name'

jid example:

echo '{"name": "John", "age": 30}' | jid

Key Differences

  • jq is a command-line JSON processor, while jid is an interactive JSON explorer
  • jid provides a real-time interface for navigating JSON structures
  • jq offers more advanced filtering and transformation capabilities

Use Cases

jq is better suited for:

  • Complex JSON processing tasks
  • Scripting and automation

jid is ideal for:

  • Quick JSON exploration and debugging
  • Interactive data inspection

Community and Support

  • jq has a larger user base and more active development
  • jid is a smaller project but offers a unique interactive approach

Both tools serve different purposes and can be complementary in a developer's toolkit. jq excels in powerful JSON manipulation, while jid shines in interactive exploration.

18,987

Terminal JSON viewer & processor

Pros of fx

  • More versatile, supporting multiple data formats (JSON, YAML, TOML) vs jid's JSON-only focus
  • Offers a wider range of features, including data manipulation and scripting capabilities
  • Provides a more interactive and visually appealing interface with syntax highlighting

Cons of fx

  • Steeper learning curve due to more complex functionality
  • Larger file size and potentially higher resource usage
  • May be overkill for simple JSON inspection tasks

Code Comparison

fx:

fx '.[0].name' data.json
fx 'map(x => x.toUpperCase())' data.json

jid:

cat data.json | jid

Key Differences

  • fx is a more comprehensive tool for working with structured data, while jid focuses specifically on JSON inspection
  • jid provides a simpler, more straightforward interface for quick JSON exploration
  • fx offers more advanced features for data manipulation and transformation
  • jid is generally faster for basic JSON viewing tasks
  • fx supports a wider range of input formats and output customization options

Both tools have their strengths, with fx being more suitable for complex data processing tasks and jid excelling in quick JSON inspection scenarios.

13,829

Make JSON greppable!

Pros of gron

  • Outputs JSON as greppable, flat statements, making it easier to search and filter
  • Can reconstruct JSON from modified gron output, allowing for easy manipulation
  • Lightweight and fast, with minimal dependencies

Cons of gron

  • Less interactive than jid, requiring more manual filtering and searching
  • Doesn't provide a real-time preview of JSON structure like jid does
  • May be less intuitive for users who prefer visual exploration of JSON data

Code Comparison

gron:

gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | grep "commit.author"

jid:

curl "https://api.github.com/repos/simeji/jid/commits?per_page=1" | jid

Summary

gron excels at converting JSON to greppable statements, making it ideal for command-line processing and scripting. It's particularly useful when working with large JSON files or when you need to perform complex filtering operations.

jid, on the other hand, provides an interactive JSON explorer with real-time filtering capabilities. It's more user-friendly for those who prefer visual exploration and immediate feedback when navigating complex JSON structures.

Both tools have their strengths, and the choice between them depends on the specific use case and personal preference. gron is better suited for automation and scripting, while jid shines in interactive exploration scenarios.

7,116

Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.

Pros of dasel

  • Supports multiple data formats (JSON, YAML, TOML, XML, CSV)
  • Offers both reading and writing capabilities
  • Provides a command-line interface and can be used as a Go package

Cons of dasel

  • Less interactive compared to jid's real-time filtering
  • May have a steeper learning curve for complex queries
  • Lacks the visual feedback that jid provides during exploration

Code Comparison

jid:

echo '{"foo": {"bar": "baz"}}' | jid

dasel:

echo '{"foo": {"bar": "baz"}}' | dasel -r json '.foo.bar'

Key Differences

  • jid focuses on interactive JSON exploration, while dasel is a more versatile tool for querying and modifying various data formats.
  • jid provides real-time filtering and visual feedback, making it easier for quick JSON exploration.
  • dasel offers more advanced querying capabilities and supports modifying data, not just reading it.
  • jid is specifically designed for JSON, while dasel supports multiple data formats.

Both tools have their strengths, with jid excelling in interactive JSON exploration and dasel offering broader data format support and manipulation capabilities.

12,086

yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor

Pros of yq

  • Supports multiple data formats (YAML, JSON, XML, properties)
  • More powerful querying and manipulation capabilities
  • Better documentation and active development

Cons of yq

  • Slower performance for large files
  • More complex syntax for advanced operations
  • Steeper learning curve for beginners

Code Comparison

yq

yq e '.users[] | select(.age > 30)' input.yaml

jid

cat input.json | jid

Summary

yq is a versatile tool for processing various data formats with advanced querying capabilities, while jid focuses on interactive JSON exploration. yq offers more features and flexibility but may be slower and more complex for simple tasks. jid excels in quick JSON inspection but lacks support for other formats and advanced manipulations.

yq is better suited for complex data processing tasks across multiple formats, while jid is ideal for rapid JSON exploration and simple queries. The choice between them depends on the specific use case and the user's familiarity with their respective syntaxes.

1,970

JSON Stream Editor (command line utility)

Pros of jj

  • Written in Go, potentially offering better performance
  • Supports both JSON and JSONL formats
  • Provides a more extensive set of features, including query language and formatting options

Cons of jj

  • Less intuitive interface for beginners compared to jid's interactive mode
  • Requires learning a specific query syntax, which may have a steeper learning curve
  • Lacks the real-time preview feature that jid offers

Code Comparison

jid example:

echo '{"foo": 123}' | jid

jj example:

echo '{"foo": 123}' | jj .foo

Key Differences

jid focuses on providing an interactive JSON explorer with real-time feedback, making it easier for users to navigate complex JSON structures without prior knowledge of the data structure. It's particularly useful for quick exploration and debugging.

jj, on the other hand, offers a more powerful command-line tool for JSON manipulation, with a query language that allows for complex operations. It's better suited for scripting and automated processing of JSON data.

Both tools have their strengths, and the choice between them depends on the specific use case and user preferences. jid is more user-friendly for interactive exploration, while jj provides more advanced features for power users and automation tasks.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

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

keydescription
TAB / CTRL + IShow available items and choice them
CTRL + WDelete from the cursor to the start of the word
CTRL + UDelete 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 + ATo the first character of the 'Filter'
CTRL + ETo the end of the 'Filter'
CTRL + JScroll json buffer 1 line downwards
CTRL + KScroll json buffer 1 line upwards
CTRL + GScroll json buffer to bottom
CTRL + TScroll json buffer to top
CTRL + NScroll json buffer 'Page Down'
CTRL + PScroll json buffer 'Page Up'
CTRL + LChange view mode whole json or keys (only object)
ESCHide a candidate box

Option

optiondescription
First argument ($1)Initial query
-hprint a help
-helpprint a help
-versionprint the version and exit
-qOutput query mode (for jq)
-Mmonochrome output mode