Welcome to JSONDiff! 🎉 This is a modern, Next.js based application that makes comparing two JSON data structures. This tool is designed to assist anyone who works with JSON data, providing a clear, intuitive.
While there are existing solutions for JSON comparison, I believe there's room for improvement, especially for professional and enterprise-level work. Here's why this JSONDiff Tool stands out:
-
Handles Dirty JSON 🧼: JSONDiff Tool not only compares but also offers options to clean and fix these JSON structures before comparison. Encountering modified, encoded, or "dirty" JSON is common during development. Most tools lack this feature to fix JSON, setting our tool apart.
-
Privacy and Security 🔒: Your JSON data is yours alone. Ensure that your data is never shared with anyone and that comparisons are done securely in your browser. Plus, our source code is open-source and deployed on GitHub Pages, allowing you to review the source code for complete transparency.
- Validate JSON syntax effortlessly.
- Format JSON for readability.
- Compare two JSON documents side-by-side.
- Fix invalid JSON
- Securely Compare JSON, Right in Your Browser, Open-source and transparent.
To begin using the website for your JSON comparison needs, simply navigate to https://jsondiff.in/.
compare.mp4
dirty-json-comparision.mp4
Here's what the JSONdiff fix feature can do for you:
- Quotes Correction: Adds or fixes missing quotes around keys.
- Escape Characters: Adds or corrects missing escape characters.
- Comma Handling: Fixes missing commas and cleans trailing commas.
- Bracket Closure: Adds or fixes missing closing brackets.
- Quote Standardization: Replaces special quote characters (e.g., “...”) with standard double quotes.
- Whitespace Normalization: Replaces special whitespace characters with regular spaces.
- Boolean and Null Values: Converts Python constants (
None,True,False) to their JSON equivalents (null,true,false). - Comment Removal: Removes comments, including both block (
/* ... */) and line (// ...) comments. - JSONP Notation Cleaning: Cleans JSONP notation (e.g.,
callback({...})). - Escaped String Cleaning: Removes unnecessary escape characters from already escaped strings (e.g.,
{\\"stringified\\": \\"content\\"}). - MongoDB Data Type Conversion: Converts MongoDB data types (e.g.,
NumberLong(2),ISODate("2022-03-03T05:02:11.111Z")) to standard JSON formats. - String Concatenation: Concatenates split strings (e.g.,
"longer text" + "more text on next line").
By addressing these issues, the fix feature ensures your JSON data is syntactically correct and ready for use in your applications.
To get started with JSONDiff on your local machine, follow these simple installation steps:
# Clone the repository
git clone https://github.com/0xrisec/jsondiff.git
# Navigate to the project directory
cd jsondiff
# Install dependencies
npm install
# Run the project
npm run devOpen http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Our tool performs all comparisons directly within your browser, ensuring your data's privacy. This can be verified by monitoring the Network tab in your browser's developer tools while a comparison is in progress. Initially, it initiates two essential calls, which are crucial for the dynamic rendering and functionality of a Next.js application. These calls retrieve necessary code chunks, page-specific data, and metadata for SEO optimization.
Throughout the comparison process, you will observe that no additional network requests are made, ensuring that your data remains private.
We value your feedback! If you have suggestions, encounter issues, or need assistance, please reach out. Your input helps us improve JSONDiff for everyone.
Thank you for choosing JSONDiff. Happy JSON comparing! 🌟
