7#ifndef AFLOW_XSERIALIZATION_H
8#define AFLOW_XSERIALIZATION_H
67 [[nodiscard]]
virtual std::string
getJsonID()
const = 0;
74#include "aurostd_xserialization.tpp"
Interface for Json serialization functionality using CRTP.
void checkClassID(const aurostd::JSON::object &jo) const
static T loadFromString(const std::string &content)
static T loadFromJson(const aurostd::JSON::object &jo)
static T loadFromFile(const std::filesystem::path &path)
virtual ~JsonSerializable()=default
void dumpToFile(const std::filesystem::path &path, aurostd::compression_type compression=aurostd::compression_type::None) const
aurostd::JSON::object dumpToJson() const
aurostd::JSON::object dumpJsonMeta() const
std::string dumpToString() const
virtual T deserialize(const aurostd::JSON::object &jo)=0
Performs the actual deserialization of members.
virtual std::string getJsonID() const =0
Returns the string ID of the class.
virtual aurostd::JSON::object serialize() const =0
Performs the actual serialization of members.
unified namespace to read and write JSON
storge container for a JSON object