JSON Explorer v0.4.0 - Release Summary
Major Release: JMESPath Integration & Enhanced Architecture
Key Highlights
Powerful JMESPath Search Engine
- Replaced custom search with industry-standard [JMESPath](https://jmespath.org/) query language
- Support for complex queries: filtering, projections, functions, and nested access
- Examples:
users[?age > \30`].name,sort_by(users, &age),length(users)` - Query validation and multi-query execution
Enhanced Visualization
- Modern Plotly-based interactive HTML charts
- Multiple output formats: terminal, HTML, or combined
- Detailed mode with 6+ chart types (data types, depth, quality metrics, complexity gauge)
Production-Ready Architecture
- Modular design with clear separation of concerns
- Comprehensive error handling and centralized logging system
Code Generation Improvements
- Bug fix: Code generation from a template
What's New
Core Modules
search.py: Complete rewrite using JMESPath withJsonSearcherclassvisualizer.py: Multi-format visualization (Plotly/curses/ASCII)tree_view.py: Enhanced tree builder with optional/conflict annotationsutils.py: Interactive input helpers with autocompletelogging_config.py: Centralized logging configuration
CLI Enhancements
--searchnow uses JMESPath syntax--show-examplesdisplays query patterns--tree-resultsfor tree-formatted search output- Better error messages and user feedback
API Improvements
# JMESPath search
from json_explorer import JsonSearcher
searcher = JsonSearcher()
result = searcher.search(data, "users[?age > `30`].email")
# Modern visualization
from json_explorer import visualize_json
visualize_json(data, output="html", detailed=True)
# Code generation
from json_explorer.codegen import quick_generate
code = quick_generate(data, "python", style="pydantic")
Documentation
Updated Documentation
- Complete API reference with examples
- JMESPath query guide with common patterns
- Configuration best practices
- Enhanced README with quick start guide
Technical Improvements
- Dependencies: Added
jmespath>=1.0.1,prompt-toolkit>=3.0.0 - Type Safety: Better type hints and validation
- Performance: Query compilation support for repeated searches
- Compatibility: Python 3.11+ with full type checking support
Breaking Changes
- Search functionality now requires JMESPath syntax (simpler and more powerful)
- Old search modes (
--search-type key/value/filter) removed in favor of JMESPath - Some configuration options renamed for consistency
Migration Guide
Old Search (v0.3.x)
json_explorer data.json --search "email" --search-type key
New Search (v0.4.0)
json_explorer data.json --search "users[*].email"
Python API
# Old
searcher.search_keys(data, "email", SearchMode.CONTAINS)
# New
searcher.search(data, "users[*].email")
Install/Upgrade:
pip install --upgrade py-json-analyzer
Links: