25 #ifndef FABLE_SCHEMA_JSON_HPP_ 26 #define FABLE_SCHEMA_JSON_HPP_ 61 this->augment_schema(j);
65 void validate(
const Conf& c)
const override { this->validate_type(c); }
69 assert(ptr_ !=
nullptr);
70 j =
static_cast<const Type&
>(*ptr_);
74 assert(ptr_ !=
nullptr);
75 *ptr_ = c.
get<Type>();
92 #endif // FABLE_SCHEMA_JSON_HPP_
void to_json(Json &j) const override
Definition: json.hpp:68
void reset_ptr() override
Definition: json.hpp:78
T get() const
Definition: conf.hpp:164
nlohmann::json Json
Definition: json.hpp:62
Json::value_t JsonType
Definition: json.hpp:78
virtual Json to_json() const
Definition: interface.hpp:220
Json json_schema() const override
Definition: json.hpp:57
void from_conf(const Conf &c) override
Definition: json.hpp:73
Definition: interface.hpp:354
std::string type_string() const override
Definition: interface.hpp:366
void validate(const Conf &c) const override
Definition: json.hpp:65