修复反序列化的 bug
This commit is contained in:
parent
ba68cd26ef
commit
4625978ab1
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user