Tool Hub

JSON 比較

兩個 JSON 物件的遞迴差異比較,使用 RFC 6901 JSON Pointer 路徑

結構性比較兩個 JSON 值。每個變更以其 RFC 6901 JSON Pointer 路徑 (例如 /user/name) 回報,並分類為新增、刪除、變更或保留。

+ 1
1
Δ 1
= 2

變更 (RFC 6901 JSON Pointer 路徑)

Δ
/age30

31
=
/name
=
/tags/0
/tags/1"user"

使用方法

  1. Paste the original JSON into the left panel and the modified JSON into the right panel。
  2. Read the stats bar showing counts of added, removed, and changed values。
  3. Browse the changes list, each entry showing its RFC 6901 JSON Pointer path and the before/after values。
  4. Download the diff as a .json file or copy the share link. All diffing runs locally in your browser。

範例

  • Changing {"a":1,"b":2} to {"a":1,"b":3,"c":4} produces 1 changed entry at /b and 1 added entry at /c。
  • Removing a nested key such as /address/zip from a larger object is listed as a removal with its full pointer path。

生產環境使用前請驗證輸出。無擔保 — 參見 條款.