#include "include/json_serializer.h" // Deserialize JSON -> class void from_json(const json& j, ticket_t& t) { t.id = j.at("id").get(); t.title = j.at("title").get(); t.description = j.at("description").get(); t.status = j.at("status").get(); t.created_at = j.at("created_at").get(); t.updated_at = j.at("updated_at").get(); } // Serialize class -> JSON void to_json(json& j, const ticket_t& t) { j = json{ {"id", t.id}, {"title", t.title}, {"description", t.description}, {"status", t.status}, {"created_at", t.created_at}, {"updated_at", t.updated_at} }; }