|
|
|
|
@ -38,6 +38,7 @@ Json::Value CheckResultJson::toJsonValue()
|
|
|
|
|
value["flen"] = p->flen;
|
|
|
|
|
value["nconfig_qx_type"] = p->nconfig_qx_type;
|
|
|
|
|
value["qx_name"] = p->qx_name;
|
|
|
|
|
value["qx_level"] = p->qx_level;
|
|
|
|
|
value["det_model_name"] = p->strModelName;
|
|
|
|
|
value["maxValue"] = p->maxValue;
|
|
|
|
|
value["grayDis"] = p->grayDis;
|
|
|
|
|
@ -118,6 +119,11 @@ void CheckResultJson::toObjectFromValue(Json::Value root)
|
|
|
|
|
tem.flen = errorJson["flen"].asFloat();
|
|
|
|
|
tem.nconfig_qx_type = errorJson["nconfig_qx_type"].asInt();
|
|
|
|
|
tem.qx_name = errorJson["qx_name"].asString();
|
|
|
|
|
// 旧版本 json 可能没有 qx_level 字段
|
|
|
|
|
if (errorJson.isMember("qx_level"))
|
|
|
|
|
{
|
|
|
|
|
tem.qx_level = errorJson["qx_level"].asString();
|
|
|
|
|
}
|
|
|
|
|
// 旧版本 json 可能没有该字段
|
|
|
|
|
if (errorJson.isMember("det_model_name"))
|
|
|
|
|
{
|
|
|
|
|
|