1
1
Fork
You've already forked jsonify
0
No description
  • C++ 92.1%
  • Shell 4.5%
  • Makefile 1.5%
  • CMake 1.1%
  • Batchfile 0.4%
  • Other 0.4%
2026年06月30日 01:39:09 +02:00
data Add data/reallybad.json 2026年06月29日 21:15:35 +02:00
include Add include/jsonparser.h 2026年06月29日 21:20:05 +02:00
scripts Add scripts/build.bat 2026年06月29日 21:26:02 +02:00
src Add src/main.cpp 2026年06月29日 21:32:16 +02:00
tests Add tests/parser_test.cpp 2026年06月29日 21:43:40 +02:00
.clang-format Add .clang-format 2026年06月29日 22:09:36 +02:00
.editorconfig Add .editorconfig 2026年06月29日 22:10:27 +02:00
.gitignore Initial commit 2026年06月29日 20:56:37 +02:00
CMakeLists.txt Add CMakeLists.txt 2026年06月29日 20:59:47 +02:00
LICENSE Initial commit 2026年06月29日 20:56:37 +02:00
Makefile Add Makefile 2026年06月29日 20:58:23 +02:00
README.md Update README.md 2026年06月30日 01:39:09 +02:00

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.