Skip to content

Repository files navigation

🩺 json-doctor

CI License: MIT Node.js GitHub Achievements

Validates, formats, and repairs broken JSON files — your JSON emergency room.

✨ Features

  • ✅ Validate JSON with helpful error messages and position hints
  • 🎨 Format/prettify with configurable indentation or minify
  • 🔧 Auto-repair: trailing commas, single quotes, unquoted keys, comments, undefined values
  • 🔍 Diff two JSON files and highlight structural changes
  • 📁 Process files or inline JSON strings

🚀 Quick Start

npm install
node src/jsondoctor.js validate data.json
node src/jsondoctor.js repair broken.json --out fixed.json

📖 Usage

node src/jsondoctor.js validate <file>
node src/jsondoctor.js format <file> [--indent 4] [--minify] [--out file]
node src/jsondoctor.js repair <file> [--out file]
node src/jsondoctor.js diff <file1> <file2>

🏆 Achievement Scripts

bash scripts/setup.sh && bash scripts/unlock-all.sh

About

No description, website, or topics provided.

Resources

Contributing

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages