teqp 0.22.0
Loading...
Searching...
No Matches
teqp::JSONValidator Class Reference

#include <json_tools.hpp>

Public Member Functions

 JSONValidator (const nlohmann::json &schema)
 
std::vector< std::string > get_validation_errors (const nlohmann::json &j) const
 
bool is_valid (const nlohmann::json &j) const
 

Public Attributes

const nlohmann::json schema
 
json_validator validator
 

Detailed Description

This class is not thread-safe for construction because the validator is not

Definition at line 130 of file json_tools.hpp.

Constructor & Destructor Documentation

◆ JSONValidator()

teqp::JSONValidator::JSONValidator ( const nlohmann::json & schema)
inline

Definition at line 137 of file json_tools.hpp.

Member Function Documentation

◆ get_validation_errors()

std::vector< std::string > teqp::JSONValidator::get_validation_errors ( const nlohmann::json & j) const
inline

Definition at line 142 of file json_tools.hpp.

◆ is_valid()

bool teqp::JSONValidator::is_valid ( const nlohmann::json & j) const
inline

Definition at line 162 of file json_tools.hpp.

Member Data Documentation

◆ schema

const nlohmann::json teqp::JSONValidator::schema

Definition at line 132 of file json_tools.hpp.

◆ validator

json_validator teqp::JSONValidator::validator

Definition at line 134 of file json_tools.hpp.


The documentation for this class was generated from the following file: