← 返回
未分类

cn-json-diff

Compare two JSON files and show differences. Support nested structures, arrays, and value changes. Pure Python standard library, no API key required.
Compare two JSON files and show differences. Support nested structures, arrays, and value changes. Pure Python standard library, no API key required.
yjkj999999
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 12
下载
💾 0
安装
1
版本
#latest

概述

JSON Diff

Compare two JSON files and show the differences in a clear format.

Features

  • Compare JSON files of any complexity
  • Detect nested object differences
  • Identify array length changes
  • Show old vs new values for changed fields
  • Pure Python, no external dependencies

Input

Two JSON files passed as arguments.

Output

List of all differences found, with paths and old/new values.

Usage

python3 scripts/json_diff.py --file1 data1.json --file2 data2.json

Example

Input file1.json:

{"name": "Alice", "age": 30, "city": "Beijing"}

Input file2.json:

{"name": "Alice", "age": 31, "city": "Shanghai"}

Output:

differences:
- age: 30 -> 31
- city: Beijing -> Shanghai
count: 2

Exit Codes

  • 0: Comparison completed (with or without differences)
  • 1: File read error

出品: AISoBrand|爱索品牌 — AI搜索优化工具

官网: https://aisobrand.com

免费检测你的品牌在AI搜索中有没有存在感 → 30秒出结果

版本历史

共 1 个版本

  • v1.0.0 从ClawHub迁移发布 当前
    2026-06-07 11:09 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,219
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 688 📥 331,811
design-media

agnes-image-gen

user_15292d5a
使用 Agnes AI 的图片生成模型生成图片,支持文生图(agnes-image-2.1-flash)和图生图(agnes-image-2.0-flash)。支持自定义 API Key,用户可使用自己的 Agnes Key。优化重点:降低
★ 1 📥 253