/json-viewer

ShamsJSON is a powerful, feature-rich JSON viewer and editor built with Next.js 15 and modern web technologies. It provides an intuitive interface for formatting, validating, searching, transforming, and visualizing JSON data - perfect for developers and data analysts.

Primary LanguageTypeScriptMIT LicenseMIT

ShamsJSON πŸš€

ShamsJSON is a powerful, feature-rich JSON viewer and editor built with Next.js 15 and modern web technologies. It provides an intuitive interface for formatting, validating, searching, transforming, and visualizing JSON data - perfect for developers and data analysts.

ShamsJSON Preview

✨ Features

πŸ”§ Core JSON Operations

  • Format & Validate: Automatically format and validate JSON with syntax highlighting
  • Import/Export: Load JSON from files or URLs, export formatted results
  • Copy to Clipboard: Quick copy functionality for formatted JSON

πŸ” Advanced Search & Navigation

  • Smart Search: Search through JSON data with advanced filtering options
  • JSONPath Queries: Execute JSONPath expressions to extract specific data
  • Key-Value Navigation: Easy navigation through complex nested structures

🎨 Visualization Tools

  • Tree Visualization: Interactive tree view of JSON structure
  • Network Graph: Visualize relationships in your JSON data
  • Syntax Highlighting: Beautiful code highlighting with Monaco Editor

πŸ”„ Data Transformation

  • JSON Transforms: Apply custom transformations to your data
  • Data Manipulation: Edit and modify JSON structures directly
  • Batch Operations: Perform operations on multiple JSON files

🎯 Developer Experience

  • Dark/Light Theme: Comfortable viewing in any environment
  • Responsive Design: Works perfectly on desktop and mobile devices
  • Keyboard Shortcuts: Efficient navigation with keyboard shortcuts
  • Error Handling: Clear error messages and validation feedback

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm

Installation

  1. Clone the repository

    git clone https://github.com/shamscorner/shamsjson.git
    cd shamsjson
  2. Install dependencies

    pnpm install
    # or
    npm install
  3. Run the development server

    pnpm dev
    # or
    npm run dev
  4. Open your browser Navigate to http://localhost:3000

πŸ› οΈ Tech Stack

πŸ“ Project Structure

shamsjson/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”œβ”€β”€ layout.tsx         # Root layout with SEO
β”‚   β”œβ”€β”€ page.tsx           # Home page
β”‚   β”œβ”€β”€ robots.ts          # SEO robots.txt
β”‚   └── sitemap.ts         # XML sitemap
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/               # shadcn/ui components
β”‚   β”œβ”€β”€ json-editor.tsx   # Monaco-based JSON editor
β”‚   β”œβ”€β”€ json-search.tsx   # Search functionality
β”‚   β”œβ”€β”€ json-tool.tsx     # Main tool component
β”‚   β”œβ”€β”€ json-transform.tsx # Data transformation
β”‚   β”œβ”€β”€ json-visualizer.tsx # Tree visualization
β”‚   β”œβ”€β”€ network-graph.tsx # Network graph visualization
β”‚   └── tree-graph.tsx    # Tree graph component
β”œβ”€β”€ hooks/                # Custom React hooks
β”œβ”€β”€ lib/                  # Utility functions
β”œβ”€β”€ public/               # Static assets
└── styles/               # Additional stylesheets

🎯 Usage Examples

Basic JSON Formatting

  1. Paste your JSON data into the editor
  2. Click "Format JSON" to beautify and validate
  3. Copy the formatted result

Advanced Search

  1. Load your JSON data
  2. Switch to the "Search" tab
  3. Use JSONPath expressions like $.users[*].name to extract specific data

Data Visualization

  1. Load complex JSON data
  2. Navigate to the "Visualize" tab
  3. Explore your data structure in an interactive tree or network view

JSON Transformation

  1. Load your source JSON
  2. Go to the "Transform" tab
  3. Apply custom transformation rules to reshape your data

πŸ”— API Reference

JSON Editor Component

import JsonEditor from "@/components/json-editor";

<JsonEditor
  value={jsonString}
  onChange={setJsonString}
  language="json"
  theme="vs-dark"
/>;

JSON Visualizer Component

import JsonVisualizer from "@/components/json-visualizer";

<JsonVisualizer data={jsonData} width={800} height={600} />;

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: pnpm test
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Next.js team for the amazing framework
  • shadcn/ui for the beautiful component library
  • Monaco Editor for the powerful code editor
  • D3.js for data visualization capabilities

πŸ“ž Support & Contact

πŸ—ΊοΈ Roadmap

  • Real-time collaboration features
  • JSON schema validation
  • Custom theme support
  • Plugin system for custom transformations
  • Performance optimizations for large JSON files
  • Mobile app version
  • API endpoint for programmatic access

Built with ❀️ by Shams Corner

Star ⭐ this repository if you find it useful!