#include "Task.h" #include #include #include namespace boost { namespace json { std::string serialize(const Tasks &tasks) { boost::json::array ret; for (auto &task : tasks) { boost::json::object t; t["id"] = task.id; t["finished"] = task.finished; t["createTime"] = task.createTime; t["content"] = task.content; t["comment"] = task.comment; ret.push_back(std::move(t)); } return boost::json::serialize(ret); } } // namespace json } // namespace boost