No description
- C++ 92.1%
- Shell 4.5%
- Makefile 1.5%
- CMake 1.1%
- Batchfile 0.4%
- Other 0.4%
| data | Add data/reallybad.json | |
| include | Add include/jsonparser.h | |
| scripts | Add scripts/build.bat | |
| src | Add src/main.cpp | |
| tests | Add tests/parser_test.cpp | |
| .clang-format | Add .clang-format | |
| .editorconfig | Add .editorconfig | |
| .gitignore | Initial commit | |
| CMakeLists.txt | Add CMakeLists.txt | |
| LICENSE | Initial commit | |
| Makefile | Add Makefile | |
| README.md | Update README.md | |
jsonify
jsonify is a lightweight, cross-platform C++17 command-line utility designed to parse, format, lint, and automatically repair JSON and JSONC (JSON with comments) files.
Built with strict performance and minimal dependencies in mind, jsonify provides a full developer pipeline for inspecting and cleaning up JSON data.
Features
- Robust Parsing: Validates and transforms raw JSON strings into an efficient, traversable node tree.
- Advanced Linting: Catches structural warnings, empty keys, deeply nested objects (>20 levels), duplicate object keys, and mixed data types within arrays.
- Pretty-Printing & Formatting: Custom terminal formatting featuring syntax-highlighting (colorized keys, strings, and numbers) or compact minification.
- Auto-Correction (
--fix): Automatically cleans up loose or trailing commas safely outside of string literals. - JSONC Support: Cleanly strips single-line (
//) and multi-line (/* */) comments before parsing.
Getting Started
Prerequisites
A C++17 compliant compiler (g++, clang++, or MSVC) and optionally CMake.
Building the Project
You can build jsonify using whichever tool fits your current workflow:
Using CMake (Recommended):
cmake -B build -S .
cmake --build build
Using GNU Make:
make
or use the automation scripts in the scripts directory.
Usage:
jsonify [options] <file.json>
There are a number of option flags that can be used.
This project is licensed under the terms of the MIT License. See LICENSE for details.