# @idlebox/node-json-edit

> Edit json file with comments (jsonc), reformat or preserve it's original format.

Latest version **2.0.37** (published 2025-05-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @idlebox/node-json-edit
pnpm add @idlebox/node-json-edit
yarn add @idlebox/node-json-edit
bun add @idlebox/node-json-edit
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.37 |
| Published | 2025-05-26 |
| First published | 2019-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 74.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Maintainers | gongt |
| Keywords | comment, edit, json, jsonc |

## Links

- npm: https://www.npmjs.com/package/@idlebox/node-json-edit
- Repository: https://github.com/GongT/baobao
- Homepage: https://github.com/GongT/baobao#readme
- Issues: https://github.com/GongT/baobao/issues
- npm.io page: https://npm.io/package/@idlebox/node-json-edit

## Dependencies (2)

- [prettier](https://npm.io/package/prettier.md) ^3.3.3
- [comment-json](https://npm.io/package/comment-json.md) ^4.2.5

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.37 (latest) — 2025-05-26
- 2.0.36 — 2025-04-24
- 2.0.35 — 2025-04-24
- 2.0.34 — 2025-04-17
- 2.0.33 — 2024-09-05
- 2.0.32 — 2024-09-01
- 2.0.31 — 2024-08-28
- 2.0.30 — 2023-08-03
- 2.0.29 — 2023-07-20
- 2.0.28 — 2023-07-20
- 2.0.26 — 2023-07-05
- 2.0.25 — 2022-11-28
- 2.0.24 — 2022-11-28
- 2.0.23 — 2022-08-12
- 2.0.22 — 2022-07-28
- … 41 more at https://npm.io/package/@idlebox/node-json-edit/versions

## README

# node-json-edit

A tool for read and write json file **with comments**.

Additional:

-   Insert property at alphabet order, not at last.
-   Re-sort keys (in any order you want).
-   Format file with [prettier](https://prettier.io/).
-   Auto load prettier config (can override with argument).

## Usage

---
_Source: https://npm.io/package/@idlebox/node-json-edit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
