Skip to content

Commit 9aa4bd2

Browse files
committed
Enhance README and implement code generation features
- Updated README.md to improve clarity and add key features. - Introduced CodeModal component for displaying generated code snippets. - Integrated code generation functionality in TreeView and CodeGenerator services. - Added support for generating JavaScript, Python, and Java code snippets.
1 parent cb941e2 commit 9aa4bd2

File tree

5 files changed

+728
-76
lines changed

5 files changed

+728
-76
lines changed

README.md

Lines changed: 69 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,63 @@
1-
# JSON Viewer 🔧
21

3-
A modern, interactive JSON viewer and editor built with React, TypeScript, and ACE Editor. Parse, format, validate, and explore your JSON data with an intuitive tree view and powerful search functionality.
2+
# JSON Viewer for Developers
43

5-
## ✨ Features
64

5+
6+
**The developer-friendly JSON viewer that generates production-ready code snippets.**
7+
8+
Interactive JSON explorer with instant code generation for JavaScript, Python, and Java. Perfect for API development, data exploration, and rapid prototyping.
9+
10+
![GitHub stars](https://img.shields.io/github/stars/killcod3/json-viewer?style=social)
11+
![GitHub forks](https://img.shields.io/github/forks/killcod3/json-viewer?style=social)
12+
![GitHub issues](https://img.shields.io/github/issues/killcod3/json-viewer)
13+
![GitHub license](https://img.shields.io/github/license/killcod3/json-viewer)
14+
15+
16+
## ⚡ Key Features
17+
18+
### 🔥 **Code Generation** - The Game Changer
19+
- **Instant Code Snippets**: Click any JSON node to generate code that accesses that exact value
20+
- **Multi-Language Support**: JavaScript, Python, and Java code generation
21+
- **Copy-Paste Ready**: Production-ready code with proper error handling
22+
- **Complex Path Support**: Handles nested objects, arrays, and special characters automatically
23+
24+
### 🛠️ **Developer Tools**
725
- **Professional Code Editor**: Powered by ACE Editor with syntax highlighting and error detection
826
- **Interactive Tree View**: Explore JSON structure with expandable/collapsible nodes
9-
- **Real-time Search**: Search through JSON content with match highlighting and navigation
10-
- **JSON Validation**: Instant validation with detailed error messages and line numbers
27+
- **Real-time Validation**: Instant JSON validation with detailed error messages and line numbers
28+
- **Smart Search**: Search through JSON content with match highlighting and navigation
1129
- **Format & Minify**: Beautify or compress JSON with one click
12-
- **Live Preview**: Real-time JSON parsing and tree visualization
13-
- **Responsive Design**: Works seamlessly on desktop and mobile devices
14-
- **Dark/Light Theme Support**: Built-in theme support via Tailwind CSS
15-
- **TypeScript**: Fully typed for better developer experience
30+
31+
### 🎯 **Built for Development Workflow**
32+
- **API Response Analysis**: Perfect for exploring API responses and extracting data
33+
- **Configuration Files**: Navigate complex config files with ease
34+
- **Data Transformation**: Understand data structure before processing
35+
- **No Manual Path Construction**: Never write `data['users'][0]['profile']['name']` manually again
1636

1737
## 🚀 Live Demo
1838

19-
[**👀 View Live Demo**](https://json-viewer-app-psi.vercel.app/)Click here to try it out!
39+
[**👀 Try the Live Demo**](https://json-viewer-app-psi.vercel.app/)Experience code generation in action!
2040

2141
## 📸 Screenshots
2242

43+
2344
### Main Interface
24-
![JSON Viewer Main Interface](https://i.postimg.cc/vmLYJvDn/chrome-DUx-ETlp2y-V.png)
45+
![JSON Viewer Main Interface](https://i.postimg.cc/5NSktxnt/chrome-a8koz-KXx-NS.png)
46+
### Code Generation in Action
47+
![Code Generation Feature](https://i.postimg.cc/SRw1zsHX/chrome-7-X2l3uzc-YQ.png)
48+
### Interactive Tree View
49+
![JSON Tree View](https://i.postimg.cc/DzJg1FdL/chrome-J9u0s-Jn85-A.png)
2550

26-
### Tree View
27-
![JSON Tree View](https://i.postimg.cc/ncCLX7w8/chrome-at-RFEV4-Ovp.png)
2851

29-
### Search Functionality
30-
![Search Feature](https://i.postimg.cc/nc4njkYP/chrome-7-G8-BRs-AVsy.png)
52+
## 💻 Perfect For
53+
54+
- **API Developers**: Quickly extract data access patterns from API responses
55+
- **Frontend Developers**: Generate data access code for React, Vue, Angular applications
56+
- **Backend Developers**: Create data parsing logic for Python, Java, Node.js
57+
- **Data Engineers**: Understand and extract from complex JSON data structures
58+
- **DevOps Engineers**: Parse configuration files and deployment manifests
3159

32-
## 🛠️ Tech Stack
3360

34-
- **Frontend**: React 18, TypeScript
35-
- **Editor**: ACE Editor (ace-builds)
36-
- **Styling**: Tailwind CSS
37-
- **Icons**: Lucide React
38-
- **Build Tool**: Vite
39-
- **Linting**: ESLint
4061

4162
## 🏃‍♂️ Quick Start
4263

@@ -68,26 +89,36 @@ A modern, interactive JSON viewer and editor built with React, TypeScript, and A
6889
http://localhost:5173
6990
```
7091

92+
7193
## 🤝 Contributing
7294

73-
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
95+
Contributions are welcome! This project is perfect for developers who want to add:
7496

97+
- **New Language Support**: Add Go, Rust, PHP, C# code generation
98+
- **Advanced Features**: JSONPath queries, schema validation, data transformation
99+
- **UI Improvements**: Dark mode, themes, better mobile support
75100

101+
### Development Setup
76102

77-
## 🐛 Bug Reports
103+
1. Fork the repository
104+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
105+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
106+
4. Push to the branch (`git push origin feature/AmazingFeature`)
107+
5. Open a Pull Request
78108

79-
If you find a bug, please create an issue with:
80-
- Bug description
81-
- Steps to reproduce
82-
- Expected behavior
83-
- Screenshots (if applicable)
84-
- Browser/OS information
109+
## 🐛 Bug Reports & Feature Requests
85110

86-
## 💡 Feature Requests
111+
### Bug Reports
112+
Create an issue with:
113+
- Bug description and steps to reproduce
114+
- JSON data that causes the issue
115+
- Expected vs actual behavior
116+
- Browser/OS information
87117

88-
Have an idea for a new feature? Open an issue with:
89-
- Feature description
90-
- Use case/motivation
118+
### Feature Requests
119+
Have an idea? Open an issue with:
120+
- Feature description and use case
121+
- How it would improve developer workflow
91122
- Proposed implementation (optional)
92123

93124
## 📄 License
@@ -96,15 +127,11 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
96127

97128
## 👨‍💻 Author
98129

99-
[Jawad Shafique](https://github.com/killcod3)
130+
**Jawad Shafique** - Full Stack Developer
131+
[GitHub](https://github.com/killcod3) | [LinkedIn](https://linkedin.com/in/jawadcodes)
100132

101-
## 📊 Stats
133+
---
134+
**Star this repository if you found it helpful!**
102135

103-
![GitHub stars](https://img.shields.io/github/stars/killcod3/json-viewer?style=social)
104-
![GitHub forks](https://img.shields.io/github/forks/killcod3/json-viewer?style=social)
105-
![GitHub issues](https://img.shields.io/github/issues/killcod3/json-viewer)
106-
![GitHub license](https://img.shields.io/github/license/killcod3/json-viewer)
107136

108-
---
109137

110-
**Star this repository if you found it helpful!**

src/App.tsx

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TreeView } from './components/TreeView';
44
import SearchBar from './components/SearchBar';
55
import { useJsonParser } from './hooks/useJsonParser';
66
import { useSearch } from './hooks/useSearch';
7-
import { Braces, Search, Code, Minimize2 } from 'lucide-react';
7+
import { Braces, Search, Code, Minimize2, Github } from 'lucide-react';
88

99
const SAMPLE_JSON = `{
1010
"name": "John Doe",
@@ -88,22 +88,36 @@ function App() {
8888
</div>
8989

9090
{/* Credits */}
91-
<div className="flex items-center space-x-1 text-base text-gray-500">
92-
<span>Built with</span>
93-
<span className="text-red-500"></span>
94-
<span>by</span>
95-
<a
96-
href="https://github.com/killcod3"
97-
target="_blank"
98-
rel="noopener noreferrer"
99-
className="font-medium text-blue-600 hover:text-blue-800 hover:underline transition-colors"
100-
>
101-
Jawad
102-
</a>
91+
<div className="flex flex-col items-center space-y-0.5 text-sm text-gray-500">
92+
<div className="flex items-center space-x-1 h-5">
93+
<a
94+
href="https://github.com/killcod3/json-viewer"
95+
target="_blank"
96+
rel="noopener noreferrer"
97+
className="flex items-center space-x-1 text-gray-600 hover:text-gray-800 transition-colors"
98+
title="View source code on GitHub"
99+
>
100+
<Github size={16} />
101+
<span>Open Source</span>
102+
</a>
103+
</div>
104+
<div className="flex items-center space-x-1 h-5">
105+
<span>Built with</span>
106+
<span className="text-red-500"></span>
107+
<span>by</span>
108+
<a
109+
href="https://github.com/killcod3"
110+
target="_blank"
111+
rel="noopener noreferrer"
112+
className="font-medium text-blue-600 hover:text-blue-800 hover:underline transition-colors"
113+
>
114+
Jawad
115+
</a>
116+
</div>
103117
</div>
104118
</div>
105119
<p className="text-gray-600 text-sm mt-1">
106-
Parse, format, and explore your JSON data with an interactive tree view
120+
Interactive JSON explorer with instant parsing and code generation
107121
</p>
108122
</div>
109123

0 commit comments

Comments
 (0)