TL;DR
JSeek is a robust command-line tool that makes searching, exploring, and manipulating JSON data a breeze. Whether you're digging through complex API responses, analyzing large datasets, or validating JSON schemas, JSeek provides an intuitive interface with flexible search options to make your life easier.
The JSON Problem
We've all been there – staring at a massive, deeply nested JSON file, trying to find that one specific key-value pair buried somewhere in the structure. You end up with dozens of browser tabs open to JSON formatters, regex testers, and Stack Overflow questions.
What if there was a better way?
Introducing JSeek
JSeek is the command-line tool I wish I had years ago. It's designed with a single purpose: to make working with JSON data as painless and efficient as possible.
Key Features That Set JSeek Apart
Multiple Search Strategies: Use exact matching when you know exactly what you're looking for, flexible matching when you're not sure, regex for complex patterns, or fuzzy matching for those "close enough" scenarios
Deep Nested Searching: No matter how deeply your data is nested, JSeek will find it and show you the exact path to get there
Interactive Exploration Mode: Drop into an interactive shell to navigate through your JSON data like a pro
Multi-Key Searches: Need to search across multiple keys at once? No problem!
Directory-Wide Searching: Search across all JSON files in a directory with a single command
Smart Filtering with Python Expressions: Filter your results with simple Python expressions like
x > 30
or'active' in x
Value Replacement: Replace values in your search results on the fly
JSON Schema Validation: Validate your JSON against schemas to ensure data integrity
Why I Built JSeek
As a developer who frequently works with complex JSON data from various APIs, I often found myself writing one-off scripts to parse and search JSON files. After the fifth time writing essentially the same code, I realized there was a need for a dedicated tool that could handle all these common JSON operations elegantly.
JSeek was born out of this frustration, with the aim of providing a Swiss Army knife for JSON data exploration that would be useful for developers, data analysts, and anyone else dealing with JSON files regularly.
Show Me the Code!
Let's dive into some examples to see JSeek in action:
Basic Search
# Find all values with key "name" containing "Alice"
jseek data.json --key name --term Alice
Advanced Search with Regex
# Find all email addresses matching a pattern
jseek users.json --key email --term "^[a-z]+@example\.com$" --regex
Interactive Exploration
# Drop into interactive mode to explore your JSON
jseek api-response.json --interactive
Search Multiple Files
# Search across all JSON files in a directory
jseek dummy.json --directory ./logs/ --key error --term "timeout"
Filter and Transform Results
# Find users older than 30
jseek users.json --key age --term "2" --filter "x>=30"
# Replace domain in all email addresses
jseek users.json --key email --term "@old.com" --replace "old.com:new.com"
Installation
Getting started with JSeek is simple:
# install from source
git clone https://github.com/eantelx/jseek.git
cd jseek
pip install -e .
What Users Are Saying
"JSeek saved me hours of work when I had to analyze a 50MB JSON file from our analytics API. The interactive mode made exploration a breeze." - Alex, Full Stack Developer
"I use JSeek almost daily now. The regex search combined with path tracing has been invaluable for our data processing pipeline." - Sarah, Data Engineer
The Road Ahead
JSeek is actively maintained and under continuous development. Future updates will include:
- JSON transformation capabilities
- Advanced visualization options
- Enhanced performance for extremely large files
- More search algorithms for specialized use cases
Join the Community
JSeek is open source and contributions are welcome! Whether you're fixing a bug, adding a feature, or improving documentation, all help is appreciated.
In Conclusion
If you work with JSON data regularly, give JSeek a try – it might just become one of your essential tools. The ability to quickly search, filter, and transform JSON data from the command line will save you countless hours and make your workflow more efficient.
Happy JSON exploring!
JSeek is licensed under MIT and is free to use for both personal and commercial projects.
Top comments (0)