小编Man*_*ani的帖子

从 JSON 模式模型派生 JSON 路径列表

我正在寻找一个 Javascript 库来列出基于 Json 架构的可能的 Json 路径。

对于如下所示的 json 模式,我想列出可能的 json 路径。

{
  "$id": "https://example.com/person.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Customer",
  "type": "object",
  "properties": {
    "firstName": {
      "type": "string",
      "description": "The person's first name."
    },
    "lastName": {
      "type": "string",
      "description": "The person's last name."
    },
    "age": {
      "description": "Age in years which must be equal to or greater than zero.",
      "type": "integer",
      "minimum": 0
    },
    "address": {
        "type": "object",
        "city": {
            "type": "string",
        },
        "country": {
            "type": "string",
        }
    }
  }
} …
Run Code Online (Sandbox Code Playgroud)

javascript json jsonschema jsonpath

5
推荐指数
2
解决办法
2673
查看次数

标签 统计

javascript ×1

json ×1

jsonpath ×1

jsonschema ×1