MQTTSuite
Loading...
Searching...
No Matches
issue-255-error-message-limit-precision.cpp File Reference
#include <nlohmann/json-schema.hpp>
#include <stdexcept>
Include dependency graph for issue-255-error-message-limit-precision.cpp:

Go to the source code of this file.

Classes

class  custom_error_handler

Functions

int main (void)

Variables

static const json schema

Function Documentation

◆ main()

int main ( void )

Definition at line 30 of file issue-255-error-message-limit-precision.cpp.

31{
33
34 auto instance = R"({ "angle": 3.1415927410125732 })"_json;
35
36 validator.set_root_schema(schema);
38 validator.validate(instance, err);
39
40 return 0;
41}
nlohmann::json_schema::json_validator validator
auto schema
Definition id-ref.cpp:69
static const auto instance
Definition issue-93.cpp:14

References schema, nlohmann::json_schema::json_validator::set_root_schema(), and nlohmann::json_schema::json_validator::validate().

Here is the call graph for this function:

Variable Documentation

◆ schema

const json schema
static
Initial value:
= R"(
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "arc.schema.json",
"properties": {
"angle": {
"type": "number",
"description": "Radians, from -π to π.",
"minimum": -3.14159265358979323846,
"maximum": 3.14159265358979323846
}
}
})"_json

Definition at line 7 of file issue-255-error-message-limit-precision.cpp.

Referenced by main().