#pragma once #include "json.hpp" class Jsonable { public: virtual nlohmann::json toJson(void) const = 0; operator nlohmann::json() const {return toJson();} virtual ~Jsonable() {} };