Update AbstractObjectParser.java by zhoulingfengofcd · Pull Request #119 · Tencent/APIJSON
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
| } | ||
| else if (method == PUT && value instanceof JSONArray | ||
| } else if (value instanceof JSONArray && method == POST && |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POST 未被 import 进来直接使用,编译报错
| JSONObject before = (JSONObject)response.get(key); | ||
| if(result.get("code").equals(200)){ | ||
| if(before!=null){ | ||
| before.put("count",before.getInteger("count")+result.getInteger("count")); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"count" 已有 JSONRequst.KEY_COUNT 常量,建议替换
| } | ||
| } else { | ||
| //只要有一条失败,则抛出异常,全部失败 | ||
| throw new RuntimeException(key + "," + valueArray.getJSONObject(i) +",新增失败!"); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议根据 JSONResponse.KEY_CODE 及 JSONResponse.KEY_MSG 改为更准确的 Exeption,方便排查错误
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters