admin
2022-07-24 e88a6656834864dd98da26118fe37d059b276537
app/JsonUtil.h
@@ -185,6 +185,30 @@
      return toJsonStr(root);
   }
   static  std::string loadLoginData(string account,string pwd) {
      Json::Value root;
      root["type"] = 20;
      Json::Value data;
      data["account"] = account;
      data["pwd"] = pwd;
      root["data"] = data;
      return toJsonStr(root);
   }
   static  std::string loadHeartbeatData(int client) {
      Json::Value root;
      root["type"] = 30;
      Json::Value data;
      data["client"] = client;
      root["data"] = data;
      return toJsonStr(root);
   }
   static  Json::Value parseJson(string data) {
      Json::Value root;
      Json::Reader reader;
@@ -192,6 +216,12 @@
      return root;
   }
   static string jsonValue2String(Json::Value value) {
      Json::FastWriter fastWriter;
      std::string output = fastWriter.write(value);
      return output;
   }