跳转到主要内容
CuteJSON
↑↓ 导航 Enter 选择 Esc 关闭

JSON Schema Diff

Compare two JSON Schemas and see exactly what changed, with every change marked breaking or not.

返回所有工具

键盘快捷键

这些快捷键在页面上对应操作存在时有效。

打开命令面板
Ctrl/Cmd + K
运行主要操作
Ctrl/Cmd + Enter
格式化
Ctrl/Cmd + Shift + F
压缩
Ctrl/Cmd + Shift + M
复制输出
Ctrl/Cmd + Shift + C
打开文件
Ctrl/Cmd + Shift + O
下载输出
Ctrl/Cmd + S
关闭此对话框
Esc
打开此对话框
F1 / ?

本地数据

以下所有内容仅存储在此浏览器、此设备上。

未保存的草稿
记住选项的工具

最近打开的文件

    此设备上尚未打开任何文件。

    通过链接分享

    内容被打包在链接 # 号之后的部分。

    分享此页面上的第一个输入。

    暂无可分享的内容。

    Old schema

    从 URL 加载

    直接从浏览器获取 URL。

    New schema

    从 URL 加载

    直接从浏览器获取 URL。

    Changes

    Paste two schemas and press Compare.

      完全在您的浏览器中运行。

      关于此工具

      This is not the JSON Diff tool: that one compares two documents by value. This compares two schemas by what they would accept, so every change also says whether it is breaking, meaning a document that satisfied the old schema could now fail the new one. A property added to the schema is not breaking on its own, since existing data simply does not have it yet; a property removed is breaking only when the new schema also sets additionalProperties to false, since only then does carrying that property become a rejection. A field becoming required is breaking, since existing data may not have it; a field no longer required is not. A type narrowing, like a change from number to integer, is breaking; a type widening, like integer to number, is not, and that one subtype relationship is the only one this tool knows among the JSON Schema primitive types. An enum value removed is breaking, since data using it now fails; a value added is not. A tightened bound, a lower maximum or a higher minimum, is breaking; a loosened one is not. A pattern change is always treated as breaking, since comparing two regular expressions for which accepts more is not attempted, and treating an unknown effect as safe would be the wrong default. The subset covered is deliberately the one the site's own Schema Generator writes and the Schema Validator applies: schema-valued additionalProperties, tuple-form items, combinators and $ref are not walked into.

      使用方法

      1. Paste the old schema into the left pane and the new one into the right, or load the sample.
      2. Press Compare.
      3. Read the breaking changes first: the summary line counts them separately, and the filter chips isolate just those rows.