|
|
|
@ -103,16 +103,17 @@ void pasre_DAT(const char *api, const char *json_str) |
|
|
|
json_buffer=NULL; |
|
|
|
} |
|
|
|
|
|
|
|
if(strlen(json_str)>4) |
|
|
|
if(strlen(json_str)>10) |
|
|
|
{ |
|
|
|
cjson_falg=1; |
|
|
|
cjson_falg=1; |
|
|
|
//判断json解析是否成功
|
|
|
|
if(!root) |
|
|
|
{ |
|
|
|
rt_kprintf("JSON parse error :%s\n",cJSON_GetErrorPtr()); |
|
|
|
cJSON_Delete(root); |
|
|
|
// return "JSON parse error\n";
|
|
|
|
} |
|
|
|
if(!root) |
|
|
|
{ |
|
|
|
rt_kprintf("JSON parse error :%s\n",cJSON_GetErrorPtr()); |
|
|
|
cJSON_Delete(root); |
|
|
|
cJSON_Delete(dat); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (strcmp(api, "SC800") == 0) |
|
|
|
|