← 返回
未分类 中文

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.
比较两个 JSON 文件并显示差异,支持嵌套结构、数组和值变更。纯 Python 标准库,无需 API 密钥。
freedompixels freedompixels 来源
未分类 clawhub v1.0.2 2 版本 100000 Key: 无需
★ 0
Stars
📥 255
下载
💾 0
安装
2
版本
#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秒出结果

版本历史

共 2 个版本

  • v1.0.2 当前
    2026-06-07 12:54
  • v1.0.0
    2026-05-21 15:45 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

dev-programming

Github

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

Feishu Daily Report

freedompixels
飞书日报/周报自动生成:从飞书文档、聊天记录、Bitable等自动汇总生成结构化报告并发送至文档或群聊。触发词:生成日报、写周报、汇总今天工作、整理飞书内容发日报、自动发日报、定时生成报告。关键词:日报、周报、日报生成、自动。
★ 0 📥 1,488
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 198 📥 68,231