更新于 2026-08-30

开源 JSON 转 Schema 工具推荐:可自托管、代码可查

闭源在线工具的最大顾虑是「我的数据去哪了」。开源方案把逻辑摊在阳光下,你既能审计,也能自己部署到内网。

本工具为什么开源

一键得到 Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "id": { "type": "integer" },
    "name": { "type": "string" },
    "active": { "type": "boolean" },
    "tags": { "type": "array", "items": { "type": "string" } },
    "profile": {
      "type": "object",
      "properties": {
        "city": { "type": "string" },
        "followers": { "type": "integer" }
      },
      "required": ["city", "followers"],
      "additionalProperties": false
    },
    "scores": { "type": "array", "items": { "type": "number" } }
  },
  "required": ["id", "name", "active", "tags", "profile", "scores"],
  "additionalProperties": false
}

自托管方式

克隆仓库后 npm install && npm run build,把 dist/ 丢到任意静态服务器即可,全程不依赖外部服务。

常见问题

开源协议是什么?

以仓库 LICENSE 为准,可自由用于个人与商业项目。

和线上版功能一致吗?

一致,线上版就是同一份代码构建产物。

相关阅读

立即免费使用 JSON 转 Schema 工具 →