27 #ifndef FABLE_JSON_WITH_STD_HPP_ 28 #define FABLE_JSON_WITH_STD_HPP_ 32 #include <nlohmann/json.hpp> 45 struct adl_serializer<
std::unique_ptr<T>> {
46 static void to_json(json& j,
const std::unique_ptr<T>& opt) {
56 struct adl_serializer<
std::shared_ptr<T>> {
57 static void to_json(json& j,
const std::shared_ptr<T>& opt) {
67 struct adl_serializer<
std::weak_ptr<T>> {
68 static void to_json(json& j,
const std::weak_ptr<T>& opt) {
69 auto ptr = opt.lock();
80 #endif // FABLE_JSON_WITH_STD_HPP_
Definition: confable.hpp:132