10 #include "../utils/runtime_error.h" 33 for (
const auto &el :
json.front().items())
35 jsonkeys.push_back(el.key());
38 for (
const auto &j :
json)
40 for (
auto it = j.cbegin(); it != j.cend(); ++it)
42 if (it.key() != jsonkeys[std::distance(j.cbegin(), it)])
This file has a definition of StaCustom class, which is a subclass of Starter class.
std::function< bool(const Json &)> JsonToBoolFunc
An alias for a function accepts a Json object and returns a bool.
StaCustom(const Json &json_)
Constructor of StaCustom class.
nlohmann::json Json
Json is an alias for nlohmann::json.
std::vector< T > Vec
Vec is an alias for vector (same as list in Python).
void runtime_error(const Str &msg)
Raise (for Python) and throw (for C++) a runtime error.
Namespace for utility functions.
std::function< void(const Json &)> JsonToVoidFunc
An alias for a function accepts a Json object.
virtual void compute_impl(Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override
This method overrides Updater::compute_impl.