VibeHunt
Back to browse
strip-json-comments-cli

strip-json-comments-cli

Strip comments from JSON.

Source

The tool provides a command‑line interface that reads JSON data, removes any JavaScript‑style comments, and optionally eliminates trailing commas, producing clean JSON suitable for parsers that do not accept comments. It can operate on files or standard input, writing the result to standard output, and offers a flag to delete comments entirely instead of preserving whitespace where they appeared. This makes it useful for developers who want to keep commented JSON in source control or configuration files while still being able to feed the files to strict JSON parsers.

Installation is performed via a global npm package, and the executable is named `strip-json-comments`. The command supports a help option and follows typical Unix pipeline usage, allowing integration into build scripts or other tooling. The underlying functionality is based on the `strip-json-comments` library, exposing its behavior through a simple CLI wrapper.

Reviews

Sign in to leave a review.

Loading reviews…

Similar apps