MQTTSuite
Loading...
Searching...
No Matches
issue-70.cpp File Reference
Include dependency graph for issue-70.cpp:

Go to the source code of this file.

Functions

int main (void)

Variables

static const json person_schema

Function Documentation

◆ main()

int main ( void )

Definition at line 36 of file issue-70.cpp.

37{
39
40 validator.set_root_schema(person_schema);
41 validator.set_root_schema(person_schema);
42
43 return 0;
44}
nlohmann::json_schema::json_validator validator
static json person_schema
Definition readme.cpp:10

References person_schema, and nlohmann::json_schema::json_validator::set_root_schema().

Here is the call graph for this function:

Variable Documentation

◆ person_schema

const json person_schema
static
Initial value:
= R"(
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A person",
"properties": {
"name": {
"description": "Name",
"type": "string"
},
"age": {
"description": "Age of the person",
"type": "number",
"minimum": 2,
"maximum": 200
},
"phones": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"name",
"age"
],
"additionalProperties": false,
"type": "object"
})"_json

Definition at line 6 of file issue-70.cpp.

Referenced by main().