You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
508 B
22 lines
508 B
#pragma once |
|
|
|
#include "domain/entities/Item.h" |
|
#include "nlohmann/json.hpp" |
|
#include <string> |
|
|
|
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
|