JSON Schema(官方)

json-schema-doc:json-schema 的文档构建器 json-schema-doc 用于生成json-schema文档的生成器。输出纯HTML。 Documentation generator for json-schema. 效果见 安装 NPM: npm install json-schema-doc --save tbower install json-schema-doc --save 使用 // 若在浏览器中使用,不借助包管理,默认是window.JsonSchemaDocGenerator var JsonSchemaDocGenerator = require( 'json-schema-doc' ); JsonSchemaDocGenerator( { type: 'object', description: '这是数据结构', properties: { name: { 立即下载

Basic example

Here is a basic example of a JSON Schema:

{
	"title": "Example Schema",
	"type": "object",
	"properties": {
		"firstName": {
			"type": "string"
		},
		"lastName": {
			"type": "string"
		},
		"age": {
			"description": "Age in years",
			"type": "integer",
			"minimum": 0
		}
	},
	"required": ["firstName", "lastName"]
}

Walkthroughs

The two examples below are step-by-step guides into building a schema:

The Space Telescope Science Institute has also published an guide aimed at schema authors.

Example data

Let's pretend we're interacting with a JSON based product catalog. This catalog has a product which has an id, a name, a price, and an optional set of tags.

Example JSON data for a product API

An example product in this API is:

{
    "id": 1,
    "name": "A green door",
    "price": 12.50,
    "tags": ["home", "green"]
}

While generally straightforward, that example leaves some open questions. For example, one may ask:

  • What is id?
  • Is name required?
  • Can price be 0?
  • Are all tags strings?

When you're talking about a data format, you want to have metadata about what fields mean, and what valid inputs for those fields are. JSON schema is a specification for standardizing how to answer those questions for JSON data.

Starting the schema

To start a schema definition, let's begin with a basic JSON schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Product",
    "description": "A product from Acme's catalog",
    "type": "object"
}

The above schema has four properties called keywords. The title and description keywords are descriptive only, in that they do not add constraints to the data being validated. The intent of the schema is stated with these two keywords (that is, this schema describes a product).

The type keyword defines the first constraint on our JSON data: it has to be a JSON Object.

Finally, the $schema keyword states that this schema is written according to the draft v4 specification.

Defining the properties

Next let's answer our previous questions about this API, starting with id.

What is id?

id is a numeric value that uniquely identifies a product. Since this is the canonical identifier for a product, it doesn't make sense to have a product without one, so it is required.

In JSON Schema terms, we can update our schema to:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Product",
    "description": "A product from Acme's catalog",
    "type": "object",
    "properties": {
        "id": {
            "description": "The unique identifier for a product",
            "type": "integer"
        }
    },
    "required": ["id"]
}

Is name required?

name is a string value that describes a product. Since there isn't much to a product without a name, it also is required. Adding this gives us the schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Product",
    "description": "A product from Acme's catalog",
    "type": "object",
    "properties": {
        "id": {
            "description": "The unique identifier for a product",
            "type": "integer"
        },
        "name": {
            "description": "Name of the product",
            "type": "string"
        }
    },
    "required": ["id", "name"]
}

Can price be 0?

According to Acme's docs, there are no free products. In JSON schema a number can have a minimum. By default this minimum is inclusive, so we need to specify exclusiveMinimum. Therefore we can update our schema with price:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Product",
    "description": "A product from Acme's catalog",
    "type": "object",
    "properties": {
        "id": {
            "description": "The unique identifier for a product",
            "type": "integer"
        },
        "name": {
            "description": "Name of the product",
            "type": "string"
        },
        "price": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
        }
    },
    "required": ["id", "name", "price"]
}

Are all tags strings?

Finally, we come to the tags property. Unlike the previous properties, tags have many values, and is represented as a JSON array. According to Acme's docs, all tags must be strings, but you aren't required to specify tags. We simply leave tags out of the list of required properties.

However, Acme's docs add two constraints:

  • there must be at least one tag,
  • all tags must be unique.

The first constraint can be added with minItems, and the second one by specifying uniqueItems as being true:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Product",
    "description": "A product from Acme's catalog",
    "type": "object",
    "properties": {
        "id": {
            "description": "The unique identifier for a product",
            "type": "integer"
        },
        "name": {
            "description": "Name of the product",
            "type": "string"
        },
        "price": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
        },
        "tags": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "minItems": 1,
            "uniqueItems": true
        }
    },
    "required": ["id", "name", "price"]
}

Summary

The above example is by no means definitive of all the types of data JSON schema can define. For more definitive information see the full standard draft.

As a final example, here's a spec for an array of products, with the products having 2 new properties. The first is a dimensions property for the size of the product, and the second is a warehouseLocationfield for where the warehouse that stores them is geographically located.

And also, since JSON Schema defines a reference schema for a geographic location, instead of coming up with our own, we'll reference the canonical one.

Set of products:

[
    {
        "id": 2,
        "name": "An ice sculpture",
        "price": 12.50,
        "tags": ["cold", "ice"],
        "dimensions": {
            "length": 7.0,
            "width": 12.0,
            "height": 9.5
        },
        "warehouseLocation": {
            "latitude": -78.75,
            "longitude": 20.4
        }
    },
    {
        "id": 3,
        "name": "A blue mouse",
        "price": 25.50,
        "dimensions": {
            "length": 3.1,
            "width": 1.0,
            "height": 1.0
        },
        "warehouseLocation": {
            "latitude": 54.4,
            "longitude": -32.7
        }
    }
]

Set of products schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Product set",
    "type": "array",
    "items": {
        "title": "Product",
        "type": "object",
        "properties": {
            "id": {
                "description": "The unique identifier for a product",
                "type": "number"
            },
            "name": {
                "type": "string"
            },
            "price": {
                "type": "number",
                "minimum": 0,
                "exclusiveMinimum": true
            },
            "tags": {
                "type": "array",
                "items": {
                    "type": "string"
                },
                "minItems": 1,
                "uniqueItems": true
            },
            "dimensions": {
                "type": "object",
                "properties": {
                    "length": {"type": "number"},
                    "width": {"type": "number"},
                    "height": {"type": "number"}
                },
                "required": ["length", "width", "height"]
            },
            "warehouseLocation": {
                "description": "Coordinates of the warehouse with the product",
                "$ref": "http://json-schema.org/geo"
            }
        },
        "required": ["id", "name", "price"]
    }
}

Purpose

This example shows a possible JSON representation of a hypothetical machine's mount points as represented in an /etc/fstab file.

An entry in the fstab file can have many different forms. Here is a possible representation of a full fstab:

{
    "/": {
        "storage": {
            "type": "disk",
            "device": "/dev/sda1"
        },
        "fstype": "btrfs",
        "readonly": true
    },
    "/var": {
        "storage": {
            "type": "disk",
            "label": "8f3ba6f4-5c70-46ec-83af-0d5434953e5f"
        },
        "fstype": "ext4",
        "options": [ "nosuid" ]
    },
    "/tmp": {
        "storage": {
            "type": "tmpfs",
            "sizeInMB": 64
        }
    },
    "/var/www": {
        "storage": {
            "type": "nfs",
            "server": "my.nfs.server",
            "remotePath": "/exports/mypath"
        }
    }
}

Not all constraints to an fstab file can be modeled using JSON Schema alone; however, it can already represent a good number of them. We will add constraints one after the other until we get to a satisfactory result.

Base schema

We will start with a base schema expressing the following constraints:

  • the list of entries is a JSON object;
  • the member names (or property names) of this object must all be valid, absolute paths;
  • there must be an entry for the root filesystem (ie, /).

We also want the schema to be regarded as a draft v4 schema, we must therefore specify $schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "/": {}
    },
    "patternProperties": {
        "^(/[^/]+)+$": {}
    },
    "additionalProperties": false,
    "required": [ "/" ]
}

Note how the valid paths constraint is enforced here:

  • we have a properties keyword with only a / entry;
  • we use patternProperties to match other property names via a regular expression (note that it does not match /);
  • as additionalProperties is false, it constrains object properties to be either / or to match the regular expression.

You will notice that the regular expression is explicitly anchored (with ^ and $): in JSON Schema, regular expressions (in patternProperties and in pattern) are not anchored by default.

For now, the schemas describing individual entries are empty: we will start describing the constraints in the following paragraphs, using another schema, which we will reference from the main schema when we are ready.

The entry schema - starting out

Here again we will proceed step by step. We will start with the global structure of our schema, which will be as such:

{
    "id": "http://some.site.somewhere/entry-schema#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "schema for an fstab entry",
    "type": "object",
    "required": [ "storage" ],
    "properties": {
        "storage": {
            "type": "object",
            "oneOf": [
                { "$ref": "#/definitions/diskDevice" },
                { "$ref": "#/definitions/diskUUID" },
                { "$ref": "#/definitions/nfs" },
                { "$ref": "#/definitions/tmpfs" }
            ]
        }
    },
    "definitions": {
        "diskDevice": {},
        "diskUUID": {},
        "nfs": {},
        "tmpfs": {}
    }
}

You should already be familiar with some of the constraints:

  • an fstab entry must be an object ("type": "object");
  • it must have one property with name storage ("required": [ "storage" ]);
  • the storage property must also be an object.

There are a couple of novelties:

  • you will notice the appearance of JSON References, via the $ref keyword; here, all references used are local to the schema, and the fragment part is a URI encoded JSON Pointer;
  • you will notice the appearance of an id: this is the URI of this resource; we assume here that this URI is the actual URI of this schema;
  • the oneOf keyword is new in draft v4; its value is an array of schemas, and an instance is valid if and only if it is valid against exactly one of these schemas;
  • finally, the definitions keyword is a standardized placeholder in which you can define inline subschemas to be used in a schema.

The fstype, options and readonly properties

The entry schema - adding constraints

Let's now extend this skeleton to add constraints to these three properties. Note that none of them are required:

  • we will pretend that we only support ext3, ext4 and btrfs as filesystem types;
  • options must be an array, and the items in this array must be strings; moreover, there must be at least one item, and all items should be unique;
  • readonly must be a boolean.

With these added constraints, the schema now looks like this:

{
    "id": "http://some.site.somewhere/entry-schema#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "schema for an fstab entry",
    "type": "object",
    "required": [ "storage" ],
    "properties": {
        "storage": {
            "type": "object",
            "oneOf": [
                { "$ref": "#/definitions/diskDevice" },
                { "$ref": "#/definitions/diskUUID" },
                { "$ref": "#/definitions/nfs" },
                { "$ref": "#/definitions/tmpfs" }
            ]
        },
        "fstype": {
            "enum": [ "ext3", "ext4", "btrfs" ]
        },
        "options": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string" },
            "uniqueItems": true
        },
        "readonly": { "type": "boolean" }
    },
    "definitions": {
        "diskDevice": {},
        "diskUUID": {},
        "nfs": {},
        "tmpfs": {}
    }
}

For now, all definitions are empty (an empty JSON Schema validates all instances). We will write schemas for individual definitions below, and fill these schemas into the entry schema.

The diskDevice storage type

This storage type has two required properties, type and device. The type can only be disk, and the device must be an absolute path starting with /dev. No other properties are allowed:

{
    "properties": {
        "type": { "enum": [ "disk" ] },
        "device": {
            "type": "string",
            "pattern": "^/dev/[^/]+(/[^/]+)*$"
        }
    },
    "required": [ "type", "device" ],
    "additionalProperties": false
}

You will have noted that we need not specify that type must be a string: the constraint described by enum is enough.

The diskUUID storage type

This storage type has two required properties, type and label. The type can only be disk, and the label must be a valid UUID. No other properties are allowed:

{
    "properties": {
        "type": { "enum": [ "disk" ] },
        "label": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        }
    },
    "required": [ "type", "label" ],
    "additionalProperties": false
}

The nfs storage type

This storage type has three required properties: type, server and remotePath. What is more, the server may be either a host name, an IPv4 address or an IPv6 address.

For the constraints on server, we use a new keyword: format. While it is not required that format be supported, we will suppose that it is here:

{
    "properties": {
        "type": { "enum": [ "nfs" ] },
        "remotePath": {
            "type": "string",
            "pattern": "^(/[^/]+)+$"
        },
        "server": {
            "type": "string",
            "oneOf": [
                { "format": "host-name" },
                { "format": "ipv4" },
                { "format": "ipv6" }
            ]
        }
    },
    "required": [ "type", "server", "remotePath" ],
    "additionalProperties": false
}

The tmpfs storage type

This storage type has two required properties: type and sizeInMB. The size can only be an integer. What is more, we will require that the size be between 16 and 512, inclusive:

{
    "properties": {
        "type": { "enum": [ "tmpfs" ] },
        "sizeInMB": {
            "type": "integer",
            "minimum": 16,
            "maximum": 512
        }
    },
    "required": [ "type", "sizeInMB" ],
    "additionalProperties": false
}

The full entry schema

The resulting schema is quite large:


{
    "id": "http://some.site.somewhere/entry-schema#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "schema for an fstab entry",
    "type": "object",
    "required": [ "storage" ],
    "properties": {
        "storage": {
            "type": "object",
            "oneOf": [
                { "$ref": "#/definitions/diskDevice" },
                { "$ref": "#/definitions/diskUUID" },
                { "$ref": "#/definitions/nfs" },
                { "$ref": "#/definitions/tmpfs" }
            ]
        },
        "fstype": {
            "enum": [ "ext3", "ext4", "btrfs" ]
        },
        "options": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string" },
            "uniqueItems": true
        },
        "readonly": { "type": "boolean" }
    },
    "definitions": {
        "diskDevice": {
            "properties": {
                "type": { "enum": [ "disk" ] },
                "device": {
                    "type": "string",
                    "pattern": "^/dev/[^/]+(/[^/]+)*$"
                }
            },
            "required": [ "type", "device" ],
            "additionalProperties": false
        },
        "diskUUID": {
            "properties": {
                "type": { "enum": [ "disk" ] },
                "label": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                }
            },
            "required": [ "type", "label" ],
            "additionalProperties": false
        },
        "nfs": {
            "properties": {
                "type": { "enum": [ "nfs" ] },
                "remotePath": {
                    "type": "string",
                    "pattern": "^(/[^/]+)+$"
                },
                "server": {
                    "type": "string",
                    "oneOf": [
                        { "format": "host-name" },
                        { "format": "ipv4" },
                        { "format": "ipv6" }
                    ]
                }
            },
            "required": [ "type", "server", "remotePath" ],
            "additionalProperties": false
        },
        "tmpfs": {
            "properties": {
                "type": { "enum": [ "tmpfs" ] },
                "sizeInMB": {
                    "type": "integer",
                    "minimum": 16,
                    "maximum": 512
                }
            },
            "required": [ "type", "sizeInMB" ],
            "additionalProperties": false
        }
    }
}

Plugging this into our main schema

Now that all possible entries have been described, we can refer to the entry schema from our main schema. We will, again, use a JSON Reference here: 

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "/": { "$ref": "http://some.site.somewhere/entry-schema#" }
    },
    "patternProperties": {
        "^(/[^/]+)+$": { "$ref": "http://some.site.somewhere/entry-schema#" }
    },
    "additionalProperties": false,
    "required": [ "/" ]
}

Wrapping up

This example is much more advanced than the previous example; you will have learned of schema referencing and identification, you will have been introduced to other keywords. There are also a few additional points to consider.

The schema can be improved

This is only an example for learning purposes. Some additional constraints could be described. For instance:

  • it makes no sense for / to be mounted on a tmpfs filesystem;
  • it makes no sense to specify the filesystem type if the storage is either NFS or tmpfs.

As an exercise, you can always try and add these constraints. It would probably require splitting the schema further.

Not all constraints can be expressed

JSON Schema limits itself to describing the structure of JSON data, it cannot express functional constraints.

If we take an NFS entry as an example, JSON Schema alone cannot check that the submitted NFS server's hostname, or IP address, is actually correct: this check is left to applications.

Tools have varying JSON Schema support

While this is not a concern if you know that the schema you write will be used by you alone, you should keep this in mind if you write a schema which other people can potentially use. The schema we have written here has some features which can be problematic for portability:

  • format support is optional, and as such other tools may ignore this keyword: this can lead to a different validation outcome for the same data;
  • it uses regular expressions: care should be taken not to use any advanced features (such as lookarounds), since they may not be supported at the other end;
  • it uses $schema to express the need to use draft v4 syntax, but not all tools support draft v4 (in fact, most don't support it).

JSON Schema验证规范-中文版 本文为中文翻译版,原文地址:http://json-schema.org/latest/json-schema-validation.html。JSON Schema(application / schema + json)有几个目的,其中一个是JSON实例验证。本文档为JSON Schema指定了一个词汇表,用于描述JSON文档的含义,为使用JSON数据的用户界面提供提示,以及对有效文档的schema进行验证。 立即下载

相关推荐

LPDDR4x 深度解析(3) - SDRAM核心操作机制

本文深入解析LPDDR4x SDRAM的核心操作机制,包括基础架构、刷新操作、读写流程及低功耗设计。详细介绍了存储阵列、地址解码器等关键模块,以及自刷新与自动刷新模式的区别。通过实测数据和技术细节,揭示LPDDR4x在性能优化和功耗控制方面的创新设计,为硬件工程师提供实用参考。

weixin_29278805的博客 308

json schema文档

类型 type Number/string/boolean/object/array/null 字符串、字符串数组形式 string minLength 非负数 maxLength 非负数 pattern 正则‘ format常用格式 日期 邮件 主机名 ip uri 正则表达式 … number/integer(整数) multipleOf 倍数 X ≥minimum x >exclusiveMinimum X ≤maximum x <exclusiveMaximu

梦殇的博客 1366

RK3588开发板量产前必做:24小时DDR压力测试到底在测什么?(附ArmSoM-W3测试脚本解析)

本文深入解析RK3588开发板量产前的24小时DDR压力测试,揭示其核心价值与技术原理。通过memtester、stressapptest和变频测试的组合使用,全面验证DDR内存稳定性。特别介绍ArmSoM-W3测试脚本的创新设计,包括并行测试架构和异常熔断机制,为开发者提供可靠的量产测试方案。

weixin_30325487的博客 454

接口响应时组装响应json_接口响应断言神器---Json Schema

介绍JSON Schema是用来标记和校验JSON数据,类似于XMLSchema,可用在自动化测试验证JSON数据。官网:http://json-schema.org/最新版本:2019-09,最常用版本:draft 04。(目前各类编程语言对draft 04支持最广泛)举个例子假如你有一个接口响应数据,返回了用户信息注册相关的信息,内容如下:在上面的例子中,注册接口要求提供code,msg,co...

weixin_39605296的博客 262

【验证技能树】UVM 源码解读01 -- UVM本质上就是软件工程方法论在芯片验证领域的应用

文章摘要: UVM(通用验证方法学)是基于SystemVerilog的芯片验证框架,采用组件化、面向对象和事务级抽象设计。其核心在于职责分离与数据流,通过Driver、Monitor、Sequencer等模块协作实现高效验证。UVM强调复用性、可扩展性和可维护性,类似软件工程的模块化与低耦合原则。理解其体系结构比记忆API更重要,有助于灵活组合组件并提升验证效率。UVM不仅是工具,更融合了软件工程思维,推动验证工作向自动化、系统化发展。掌握UVM底层逻辑能优化验证环境设计,适用于从IP到SoC的多层级验证场

qq_45869788的博客 1041

别再只盯着meta包了!盘点R语言中7个元分析工具包的特色与适用场景

本文深入评测了R语言中7个主流元分析工具包(meta、metafor、netmeta、mada、mvmeta、metasens、rmeta)的核心功能与适用场景,帮助研究者根据具体需求精准选型。通过对比表格和实际代码示例,详细解析了各工具包在传统两两比较、网络Meta分析、诊断准确性研究等不同场景下的差异化优势,并提供了性能对比和组合使用建议。

weixin_30736301的博客 297

JSON Schema介绍2

上篇文章主要介绍了JSON Schema的标准、规范、实现(https://blog.youkuaiyun.com/liuxiao723846/article/details/108523139),接下来本文重点介绍JSON Schema的使用和示例。 三、快速开始 官网链接:http://json-schema.org/understanding-json-schema/ json schema在线校验工具:https://jsonschemalint.com/ json schema在线生成功能:ht.

赶路人儿 2037

HPC软件使用之ANSYS Fluent

本文介绍了如何在超级计算机上使用ANSYS Fluent进行科学计算和工程仿真。文章首先对Fluent软件进行了简要介绍,强调了其在计算流体力学领域的广泛应用和强大功能。接着,详细说明了如何编写jou脚本文件和slurm脚本文件,以控制Fluent的计算流程和作业提交。文章还提供了作业提交和查看的具体命令,并通过一个鼓风机仿真的案例演示了从网格模型准备、脚本编写、作业提交到结果查看的完整流程。最后,展示了使用Fluent进行结果可视化的方法。

欢迎各位大佬光临“寒舍”!请多多指点,共同进步! 2212

json schema多种形式_JsonSchema使用详解

JSON Schema是一个用于验证JSON数据结构的强大工具, 我查看并学习了JSON Schema的官方文档, 做了详细的记录, 分享一下。我们可以使用JSON Schema在后续做接口测试中做详细的数据值的校验, 数据类型校验, json数据结构的校验。jsonschema用以标注和验证JSON文档的元数据的文档简单实例有一个简单的json数据, 根据json数据格式编写jsonschema...

weixin_39599654的博客 1714

YOLOv11改进 | 注意力篇 | YOLOv11引入24年最新的ELA注意力机制,并构建C2PSA_ELA

为了解决这些限制,本文介绍了一种高效的本地注意力(ELA)方法,实现了一个简单的结构,大幅度的性能改善。我们精心设计了ELA中的三个超参数,产生了四个不同的版本:ELA-T,ELAB,ELA-S和ELA-L,以满足不同视觉任务的具体要求,如图像分类,目标检测和语义分割。到此本文的正式分享内容就结束了,在这里给大家推荐我的YOLOv11改进有效涨点专栏,本专栏目前为新开的,后期我会根据各种前沿顶会进行论文复现,也会对一些老的改进机制进行补充,如果大家觉得本文帮助到你了,订阅本专栏,关注后续更多的更新~

tsg6698的博客 1286

Nerf 训练自有数据

colmap相机位姿转为LLFF格式数据

zfjBIT的专栏 2309

spring.datasource.schema/data 根据官网深趴

大家好,我是神韵,是一个技术&生活博主。出文章目的主要是两个,一是好记忆不如烂笔头,记录总结中提高自己。二是希望我的文章可以帮到大家。欢迎来点赞打卡,你们的行动将是我无限的动力。 本篇主题是:spring.datasource.schema/data spring.datasource.data 一、参数解释 https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/html/common-application-proper.

神韵 3989

ASP.NET Core 6 Web API在IIS上的部署与调试

通过以上步骤和配置,你应该能够成功部署并调试你的ASP.NET Core 6 Web API在IIS上。记住,权限和配置是关键,确保你的环境和应用程序代码都正确设置。希望这篇博客对你部署和解决IIS上的问题有所帮助。

m0_74337424的博客 522

如何用 Reactive Resume 官方 JSON Schema 校验导出的简历 JSON 文件?

你从 Reactive Resume 导出了简历的 JSON 文件(备份、交给 AI 修改、或准备导入另一个账号/系统),需要确认这份文件仍然符合官方的简历数据模型。项目为此发布了一个公开的 JSON Schema(draft 2020-12 方言),并给出了可直接使用的校验方法。本文的操作路径是:先按界面步骤拿到导出文件,再从官方端点取回 schema,最后用 Ajv 2020 跑校验并根据 `

gitblog_01152的博客 869

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

扣子图文消息JSON Schema验证失败?12个高频报错码详解及官方未公开的调试技巧

快速定位并修复扣子图文消息JSON Schema验证失败问题,详解12个高频报错码、对应场景及官方未公开的调试技巧,涵盖字段格式、嵌套结构、必填项校验等核心方法,提升Bot开发效率与稳定性,值得收藏。

BreakNexus的博客 220

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

ChatGPT报错不再靠猜:基于OpenAI官方Error Schema v2.3的结构化诊断框架(含Postman测试集合+JSON Schema校验工具)

ChatGPT报错处理方法不再靠经验猜测,提供基于OpenAI官方Error Schema v2.3的结构化诊断框架。覆盖API调用、参数校验、网络异常等常见场景,集成Postman测试集合与JSON Schema校验工具,精准定位错误根源。提升调试效率,值得收藏。

CodeIsle的博客 189

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

别再手写提示词了!Seedance 2.0官方推荐的4类结构化模板(含JSON Schema约束+动态变量注入语法)

告别手写提示词低效痛点!本文分享Seedance 2.0 RESTful API接入规范提示词模板分享,涵盖通用问答、数据提取、多轮对话、指令执行4类结构化模板,支持JSON Schema校验与动态变量注入,提升API调用准确率与开发效率,值得收藏。

PoliSeed的博客 382

JSON Schema:json的说明书

JSON Schema作为JSON数据的定义规范,从API契约到数据校验发挥重要作用。文章概述了其三大核心场景:1)API接口契约定义,实现前后端数据校验一致;2)数据管道校验,确保ETL流程数据质量;3)低代码平台数据建模,支持动态表单生成。详细解析了类型定义、结构约束等核心规范,并介绍了Ajv、Quicktype等配套工具链。JSON Schema已从单纯的数据格式发展为现代系统的数据契约语言,在微服务、低代码等场景中成为跨系统协作的通用标准。(149字)

坚持做正确的事情! 1053

探索高效能:json-schema-benchmark (draft6) 项目深度解析

探索高效能:json-schema-benchmark (draft6) 项目深度解析 在现代软件开发中,JSON Schema 验证器是确保数据一致性和质量的关键工具。今天,我们将深入探讨一个专注于 Node.js 环境下 JSON Schema 验证器性能比较的开源项目——json-schema-benchmark (draft6)。这个项目不仅提供了详尽的性能基准测试,还与官方 JSON S...

gitblog_00115的博客 732

JSON-Schema-Benchmark 项目推荐

JSON-Schema-Benchmark 项目推荐 1. 项目基础介绍及主要编程语言 json-schema-benchmark 是一个开源项目,旨在对 Node.js 环境下的 JSON-schema 验证器进行性能基准测试。该项目的核心是评估不同 JSON-schema 验证器的性能,通过运行官方 JSON-schema 测试套件(版本 draft6)并提供测试结果。项目主要使用 JavaS...

gitblog_00281的博客 433

AWS CloudFormation Template Schema 项目使用指南

AWS CloudFormation Template Schema 项目使用指南 1. 项目基础介绍和主要编程语言 AWS CloudFormation Template Schema 是一个开源项目,旨在通过简单代码流程将现有的资源规范文件转换成 JSON Schema 格式文档。这个模式可以集成到如 Visual Studio Code 和 PyCharm 等流行的集成开发环境(IDE)中,...

gitblog_01090的博客 788

JSON格式验证规范--JSON-SCHEMA

公司要求用json-schema对json字符串的格式进行校验,发现网络上相关的内容很少,尤其是中文介绍json-schema用法的更是少之又少;只要大费周章的抱着英文文档去啃,为了方便大家,我把自己看明白的分享给大家互相学习和交流,有缺漏和错误之处请大家指正。 首先分享四个相关网址,便于大家学习 1、应该是json-schema官方文档地址,比较详细和全面,还有一些demo的介绍. htt

A_finder的博客 1万+

JSON-SCHEMA

这几天在写代码,和开发那边规范统一后,注释的JOSN需要写清楚schema, 于是学习了一下,国内的东西确实很少,看官网的英文文档也很蛋疼。 就把自己和看到的总结一下: http://json-schema.org/latest/json-schema-core.html 官网的文档,E文好的童鞋可以去阅读,非常详细。 http://wiki.jikexueyuan.com/p...

angaoux03775的博客 124

【AMAD】jsonschema -- (又)一个JSON Schema的Python实现

动机 简介 用法 个人评分 动机 JSON Schema1是一个专业词汇,可以让你注解和验证JSON文档。 使用JSON Schema的好处有: 描述你的数据格式 提供清晰的易读的文档 验证数据: 用户自动化测试 确保用户提交的数据合法 简介 jsonschema2是JSON Schema的python实现。支持python2.7+, ...

weixin_30570101的博客 166

ArkType JSON Schema 互操作指南:`@ark/json-schema` 的 Schema 转换与类型安全

本文是一份关于 ArkType 官方包 `@ark/json-schema` 的实战指南。它面向当前代码库中已使用 JSON Schema 进行运行时校验、希望平滑迁移到 ArkType 的开发者,也面向希望将 ArkType 类型反向导出为 JSON Schema 的开发者。读完本文,你将掌握 `jsonSchemaToType()` 的完整用法与支持范围、`Type.toJsonSchema(

gitblog_01130的博客 163

3 条路线在 Windows 安装 Android 应用:APK Installer 完整安装与使用指南

APK Installer 是 Windows 上的开源安卓应用安装器,基于 Windows Subsystem for Android 技术,让 .apk 文件不经过模拟器直接装进 Windows 10/11。它服务两类人:想在电脑上随手打开安卓应用的桌面用户,以及需要批量侧载的进阶用户。若你的需求是高频 ADB 调试、大规模分发应用,或目标应用强依赖 GPS、短信等安卓原生能力,这台工具帮不上

gitblog_00965的博客 591
上一篇: 安装pydev的版本匹配
下一篇: Django框架里的MVC思想
whackw
博客等级 码龄16年 203粉丝 69原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值