1 #ifndef CASM_json_optional
2 #define CASM_json_optional
7 struct jsonConstructor;
10 template <
typename T,
typename... Args>
12 if (value.has_value()) {
20 template <
typename T,
typename... Args>
35 template <
typename... Args>
40 std::optional<T> value =
bool is_null() const
Check if null type.
jsonParser & put_null()
Puts 'null' JSON value.
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
void from_json(ClexDescription &desc, const jsonParser &json)
static std::optional< T > from_json(jsonParser const &json, Args &&... args)
Default from_json is equivalent to.
Helper struct for constructing objects that need additional data.
static ReturnType from_json(const jsonParser &json)
Default from_json is equivalent to.