← 返回
效率工具 中文

Json Modifier

Safely apply structured JSON patches (RFC 6902) to files. Use this skill when you need to update configuration files, package.json, or memory JSONs without r...
安全地对文件应用结构化的 JSON 补丁(RFC 6902)。当需要在不完全重写的情况下更新配置文件、package. 或内存 JSON 文件时,请使用此技能。
wanng-ide
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,214
下载
💾 5
安装
1
版本
#latest

概述

JSON Modifier

A utility for modifying JSON files using RFC 6902 JSON Patch format.

Supports precise additions, removals, replacements, moves, copies, and tests.

Usage

# Modify a file in place
node skills/json-modifier/index.js --file path/to/config.json --patch '[{"op": "replace", "path": "/key", "value": "new_value"}]'

# Modify and save to a new file
node skills/json-modifier/index.js --file input.json --patch '[...]' --out output.json

# Use a patch file
node skills/json-modifier/index.js --file input.json --patch-file patches/update.json

Patch Format (RFC 6902)

The patch must be a JSON array of operation objects.

Examples

Replace a value:

[
  { "op": "replace", "path": "/version", "value": "2.0.0" }
]

Add a new key:

[
  { "op": "add", "path": "/features/new_feature", "value": true }
]

Remove a key:

[
  { "op": "remove", "path": "/deprecated_key" }
]

Append to an array:

[
  { "op": "add", "path": "/list/-", "value": "item" }
]

Safety

  • Validates patch against document before applying.
  • Atomic write (writes to temporary file, then renames).
  • Preserves indentation (default: 2 spaces).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 07:07 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Api Tester

wanng-ide
执行结构化HTTP/HTTPS请求(GET、POST、PUT、DELETE),支持自定义标头和JSON正文。适用于API测试、健康检查或交互操作。
★ 7 📥 7,483
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 439 📥 147,693
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,858