Cn Json Diff
v1.0.0Compare two JSON files and show differences. Support nested structures, arrays, and value changes. Pure Python standard 库, no API key required.
运行时依赖
版本
Show old vs new values for changed fields
安装命令
点击复制本土化适配说明
Cn Json Diff 安装说明: 安装命令:["openclaw skills install cn-json-diff"] 该技能用于国内通用相关操作,可能需要相应的平台账号或API密钥
技能文档
JSON Diff
Compare two JSON files and show the differences in a clear 格式化.
Features Compare JSON files of any complexity 检测 nested object differences Identify array length changes Show old vs new values for changed fields Pure Python, no external dependencies 输入
Two JSON files passed as arguments.
输出
列出 of all differences found, with paths and old/new values.
Usage python3 scripts/json_diff.py --file1 data1.json --file2 data2.json
Example
输入 file1.json:
{"name": "Alice", "age": 30, "city": "Beijing"}
输入 file2.json:
{"name": "Alice", "age": 31, "city": "ShanghAI"}
输出:
differences:
- age: 30 -> 31
- city: Beijing -> ShanghAI
Exit Codes 0: Comparison completed (with or without differences) 1: File read error