跳到正文
OpsKit

JSON 格式化与验证

在浏览器中本地格式化、压缩并验证 JSON

全部在浏览器内完成. 这个页面是静态文件。你输入的内容只留在标签页里,不会发送到服务器,关闭即消失。所以粘贴真实的令牌或配置是安全的。

什么时候用得上

  • Reading compact API responses.
  • Checking configuration syntax before deployment.
  • Producing stable output with sorted object keys.

实际示例

Compact object

输入
{"ok":true,"items":[1,2]}
结果
Indented JSON

Strings, numbers and arrays retain their original values.

容易出错的地方

Using JavaScript object syntax

JSON requires double-quoted keys and strings and does not allow comments or trailing commas.

常见问题

Is my JSON uploaded?

No. Parsing and formatting use the browser's built-in JSON implementation.

相关工具