28 lines
730 B
C++
28 lines
730 B
C++
#pragma once
|
|
|
|
#include <nlohmann/json.hpp>
|
|
|
|
#include <cppbase/result.hpp>
|
|
|
|
#include <ikarus/values/data.hpp>
|
|
#include <ikarus/values/errors.hpp>
|
|
#include <ikarus/values/schema.hpp>
|
|
|
|
struct IkarusValue {
|
|
IkarusValueSchema schema;
|
|
IkarusValueData data;
|
|
|
|
static auto from_json(nlohmann::json const & json)
|
|
-> cppbase::Result<IkarusValue, IkarusValueParseError>;
|
|
static auto to_json(nlohmann::json & json, IkarusValue const & value)
|
|
-> void;
|
|
};
|
|
|
|
struct IkarusValues {
|
|
static auto from_json(nlohmann::json const & json)
|
|
-> cppbase::Result<IkarusValues, IkarusValuesParseError>;
|
|
static auto to_json(nlohmann::json & json, IkarusValues const & values)
|
|
-> void;
|
|
|
|
std::vector<std::pair<std::string, IkarusValue>> values;
|
|
};
|