#pragma once #include "domain/entities/Item.h" #include "nlohmann/json.hpp" #include namespace nxl::autostore::infrastructure { class JsonItem { public: static domain::Item fromJson(const std::string& jsonBody); static std::string toJson(const domain::Item& item); static nlohmann::json toJsonObj(const domain::Item& item); static domain::Item fromJsonObj(const nlohmann::json& j); private: JsonItem() = delete; ~JsonItem() = delete; }; } // namespace nxl::autostore::infrastructure