We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public class MyDataConvertAdapter implements ApiDataConvertAdapter { @OverRide public String getData(JSONObject jsonObject) { log.info(jsonObject.toJSONString()); if(jsonObject.containsKey("result")){ try { JSONArray pageList = jsonObject.getJSONObject("result").getJSONArray("records"); return pageList.toJSONString(); } catch (Exception e){ log.info("contractParser 异常:{}",e.getMessage()); } } return ""; } }
解析前: 解析后:
The text was updated successfully, but these errors were encountered:
收录 ws
Sorry, something went wrong.
null字段的字段被清除,已修复,待新版本发布
No branches or pull requests
版本号:1.4.2
问题描述:Api解析时,实现 ApiDataConvertAdapter 自定义转换,getData(JSONObject jsonObject) jsonObject里面字段值为null的字段被清除了,创建报表时获取到的字段缺少
public class MyDataConvertAdapter implements ApiDataConvertAdapter {
@OverRide
public String getData(JSONObject jsonObject) {
log.info(jsonObject.toJSONString());
if(jsonObject.containsKey("result")){
try {
JSONArray pageList = jsonObject.getJSONObject("result").getJSONArray("records");
return pageList.toJSONString();
} catch (Exception e){
log.info("contractParser 异常:{}",e.getMessage());
}
}
return "";
}
}
错误日志&截图:
解析前:
解析后:
重现步骤:通过fastJsonConverters 将null转为"", 可解决,但日期注解@jsonformat 失效,通过MappingJackson2HttpMessageConverter,也可解决,但转换出现其他错误,目前未找到好的解决方法,求助
友情提示(为了提高issue处理效率):
The text was updated successfully, but these errors were encountered: