修复反序列化的 bug

This commit is contained in:
keqingmoe 2024-12-31 03:00:01 +08:00
parent ba68cd26ef
commit 4625978ab1

View File

@ -100,9 +100,9 @@ extern "C"
int modify_set(int id, const char* name, const char* problems, const char* data)
{
auto json = nlohmann::json{
{"name", name },
{"problems", nlohmann::json(problems) },
{"data", nlohmann::json::parse(data)}
{"name", name },
{"problems", nlohmann::json::parse(problems)},
{"data", nlohmann::json::parse(data) }
};
auto status = sets_db->Put(leveldb::WriteOptions{}, std::to_string(id), json.dump());
if (!status.ok()) {