/******************************************************************************
*	File		-	json_serializable.h
*	Author		-	Joey Pollack
*	Date		-	2022/06/29 (y/m/d)
*	Mod Date	-	2022/06/29 (y/m/d)
*	Description	-	Base class for any json serializable object
******************************************************************************/

#ifndef LUNARIUM_JSON_SERIALIZABLE_H_
#define LUNARIUM_JSON_SERIALIZABLE_H_

#include <utils/op_res.h>
#include <nlohmann/json.hpp>

namespace lunarium
{
    class JSONSerializable
    {
    public:
        [[nodiscard]] virtual OpRes Serialize(nlohmann::ordered_json& node) = 0;
        [[nodiscard]] virtual OpRes Deserialize(nlohmann::ordered_json& node) = 0;
        [[nodiscard]] virtual nlohmann::ordered_json AsJSON() = 0;
        [[nodiscord]] virtual bool IsValidNode(nlohmann::ordered_json& node) = 0;

    };
}

#endif  // LUNARIUM_JSON_SERIALIZABLE_H_