12#include <nlohmann/json_fwd.hpp>
17namespace ezconfig::json {
20concept Constructible = ::ezconfig::Constructible<T, const nlohmann::json &>;
33template<
typename Base>
34std::unique_ptr<Base>
Create(
const nlohmann::json & j);
50#define EZ_JSON_DECLARE(Base) EZ_FACTORY_DECLARE(Base, const nlohmann::json &)
55template<ezconfig::json::Constructible Base>
56struct nlohmann::adl_serializer<std::shared_ptr<Base>>
58 static void from_json(
const json & j, std::shared_ptr<Base> & ptr);
64template<ezconfig::json::Constructible Base>
65struct nlohmann::adl_serializer<std::unique_ptr<Base>>
67 static void from_json(
const json & j, std::unique_ptr<Base> & ptr);
std::unique_ptr< Base > Create(const nlohmann::json &json)
Create an object using the factory.