MQTTSuite
Loading...
Searching...
No Matches
issue-70.cpp
Go to the documentation of this file.
1#include <nlohmann/json-schema.hpp>
2
3using nlohmann::json;
4using nlohmann::json_schema::json_validator;
5
6static const json person_schema = R"(
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;
35
36int main(void)
37{
38 json_validator validator;
39
42
43 return 0;
44}
int main()
Definition format.cpp:34
static const json person_schema
Definition issue-70.cpp:6