Cjson 动态链接库
cjson解析 示例代码: memberlist = getValue(lr_eval_string("{response}"),"\"memberList\":",",\"totalCount\"",200,1); root = (cJSON *) cJSON_Parse(memberlist); arraysize = cJSON_GetArraySize(root); if (arraysize>1) { memset(trancode,0,6); sprintf(trancode,"%s"," AT0101"); lr_save_string("同意入队-AT0101","TransName"); lr_save_string("\"tran_success\":\"1\"","Check"); lr_save_string("POST","ReqMethod"); lr_save_string("/ebank_s/get_html5?app=ebank&o=i","InterfaceName"); for (i=0;ivaluestring)==0) { item = (cJSON *) cJSON_GetObjectItem(object,"userid"); lr_message ("userid :%s",item->valuestring); memset(keyparam,0,1000); sprintf(keyparam,"processCode=FM0001&keyParam;={\"REQ_HEAD\":{},\"REQ_BODY\":{\"processCode\":\"AT0101\",\"contractNo\":\"%s\",\"teamId\":\"%s\",\"userId\":\"%s\",\"option\":\"1\"," "\"tranCode\":\"AT0101\",\"matchId\":\"%s\"}}",lr_eval_string("{contractno}"),teamid,item->valuestring,lr_eval_string("{matchid}")); memset(Data,0,10240); BuildMassBody(Data,keyparam,trancode); lr_save_string(Data,"ParaStr"); AT0101"); lr_save_string("同意入队-AT0101","TransName"); lr_save_string("\"tran_success\":\"1\"","Check"); lr_save_string("POST","ReqMethod"); lr_save_string("/ebank_s/get_html5?app=ebank&o=i","InterfaceName"); for (i=0;ivaluestring)==0) { item = (cJSON *) cJSON_GetObjectItem(object,"userid"); lr_message ("userid :%s",item->valuestring); memset(keyparam,0,1000); sprintf(keyparam,"processCode=FM0001&keyParam;={\"REQ_HEAD\":{},\"REQ_BODY\":{\"processCode\":\"AT0101\",\"contractNo\":\"%s\",\"teamId\":\"%s\",\"userId\":\"%s\",\"option\":\"1\"," "\"tranCode\":\"AT0101\",\"matchId\":\"%s\"}}",lr_eval_string("{contractno}"),teamid,item->valuestring,lr_eval_string("{matchid}")); memset(Data,0,10240); BuildMassBody(Data,keyparam,trancode); lr_save_string(Data,"ParaStr");
暂无评论