Loading [MathJax]/extensions/tex2jax.js
Plugins
Toggle main menu visibility
ug4
Modules
ugBase
libAlgebra
libDiscretization
libGrid
Plugins
Registry
Scripts
Apps
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Variables
Typedefs
Enumerations
Enumerator
c
k
m
r
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
v
w
x
y
Typedefs
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
Files
File List
File Members
All
_
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
h
i
l
m
n
p
r
s
t
v
w
Variables
b
c
e
f
n
p
q
r
s
u
Macros
_
b
h
l
n
o
p
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
json_schema_validator.hpp
Go to the documentation of this file.
1
/*
2
* JSON schema validator for JSON for modern C++
3
*
4
* Copyright (c) 2016-2019 Patrick Boettcher <p@yai.se>.
5
*
6
* SPDX-License-Identifier: MIT
7
*
8
*/
9
10
#ifndef __H__UG__JSON_SCHEMA_VALIDATOR_HPP__
11
#define __H__UG__JSON_SCHEMA_VALIDATOR_HPP__
12
13
#include <nlohmann/json-schema.hpp>
14
15
#include <fstream>
16
#include <iostream>
17
18
#include "
ug.h
"
19
#include "
common/error.h
"
20
#include "
common/log.h
"
21
#include "
common/util/smart_pointer.h
"
22
23
24
25
26
27
28
29
namespace
ug
30
{
31
namespace
JSONToolkit
32
{
33
34
struct
JSONSchemaValidator
:
public
nlohmann::json_schema::json_validator
35
{
36
37
typedef
nlohmann::json_schema::json_validator
base_type
;
38
39
JSONSchemaValidator
();
40
41
~JSONSchemaValidator
(){};
42
44
void
init
(nlohmann::json& schema);
45
47
bool
validate_document
(nlohmann::json& document);
48
49
};
34
struct
JSONSchemaValidator
:
public
nlohmann::json_schema::json_validator {
…
};
50
51
}
// namespace JSONToolkit
52
53
}
// namespace ug
54
55
#endif
// __H__UG__JSON_SCHEMA_VALIDATOR_HPP__
error.h
log.h
ug
smart_pointer.h
ug::JSONToolkit::JSONSchemaValidator
Definition
json_schema_validator.hpp:35
ug::JSONToolkit::JSONSchemaValidator::validate_document
bool validate_document(nlohmann::json &document)
Do the actual validation of the document.
Definition
json_schema_validator.cpp:68
ug::JSONToolkit::JSONSchemaValidator::~JSONSchemaValidator
~JSONSchemaValidator()
Definition
json_schema_validator.hpp:41
ug::JSONToolkit::JSONSchemaValidator::base_type
nlohmann::json_schema::json_validator base_type
Definition
json_schema_validator.hpp:37
ug::JSONToolkit::JSONSchemaValidator::JSONSchemaValidator
JSONSchemaValidator()
Definition
json_schema_validator.cpp:48
ug::JSONToolkit::JSONSchemaValidator::init
void init(nlohmann::json &schema)
Set root.
Definition
json_schema_validator.cpp:53
ug.h
plugins
JSONToolkit
src
json_schema_validator.hpp
Generated on Mon Feb 24 2025 01:12:46 for Plugins by
1.9.8