Health-GPS
3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
schema.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <nlohmann/json.hpp>
4
5
#include <filesystem>
6
#include <string>
7
#include <string_view>
8
9
namespace
hgps::input
{
17
std::string
strip_schema_fragment
(std::string_view uri);
18
19
void
validate_json
(std::istream &is,
const
std::string &schema_file_name,
int
schema_version);
20
27
nlohmann::json
load_and_validate_json
(
const
std::filesystem::path &file_path,
28
const
std::string &schema_file_name,
int
schema_version,
29
bool
require_schema_property =
true
);
30
}
// namespace hgps::input
hgps::input
Data structures containing model parameters and configuration options.
Definition
configuration.cpp:75
hgps::input::load_and_validate_json
nlohmann::json load_and_validate_json(const std::filesystem::path &file_path, const std::string &schema_file_name, int schema_version, bool require_schema_property)
Load a JSON file and validate against the specified schema.
Definition
schema.cpp:67
hgps::input::strip_schema_fragment
std::string strip_schema_fragment(std::string_view uri)
Validate a JSON stream against the specified schema.
Definition
schema.cpp:39
hgps::input::validate_json
void validate_json(std::istream &is, const std::string &schema_file_name, int schema_version)
Definition
schema.cpp:48
HealthGPS.Input
schema.h
Generated by
1.15.0