Go to the documentation of this file. 1#include <nlohmann/json-schema.hpp>
7{
8 "$schema": "http://json-schema.org/draft-07/schema#",
9 "title": "A person",
10 "properties": {
11 "name": {
12 "description": "Name",
13 "type": "string"
14 },
15 "age": {
16 "description": "Age of the person",
17 "type": "number",
18 "minimum": 2,
19 "maximum": 200
20 },
21 "phones": {
22 "type": "array",
23 "items": {
24 "type": "number"
25 }
26 }
27 },
28 "required": [
29 "name",
30 "age"
31 ],
32 "additionalProperties": false,
33 "type": "object"
34})"_json;
void set_root_schema(const json &)
static const json person_schema