public class IdCardBean {
/*
* 图像方向,当detect_direction=true时存在。
- -1:未定义,
- 0:正向,
- 1: 逆时针90度,
- 2:逆时针180度,
- 3:逆时针270度
*/
private int direction;
/*
* normal-识别正常
reversed_side-身份证正反面颠倒
non_idcard-上传的图片中不包含身份证
blurred-身份证模糊
other_type_card-其他类型证照
over_exposure-身份证关键字段反光或过曝
unknown-未知状态
*/
private String image_status;
//输入参数 detect_risk = true 时,则返回该字段识别身份证类型: normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknow-其他未知情况
private String risk_type;
//如果参数 detect_risk = true 时,则返回此字段。如果检测身份证被编辑过,该字段指定编辑软件名称,如:Adobe Photoshop CC 2014 (Macintosh),如果没有被编辑过则返回值无此参数
private String edit_tool;
//唯一的log id,用于问题定位
private Long log_id;
//定位和识别结果数组
private List words_result;
//识别结果数,表示words_result的元素个数
private int words_result_num;
省略get set
public static class Words_result{
//location 位置数组(坐标0点为左上角)
//定位和识别结果数组
private List location;
//识别结果字符串
private String words;
省略get set
public static class location_A{
private int left;
private int top;
private int width;
private int height;
省略get set
}
}
}
JSON.parseObject(result,IdCardBean.class) result没问题的,就是这个bean写法不对,求大神留步看看
楼主再次封装方便调用?
http://ai.baidu.com/forum/topic/show/498362
补上链接
【身份证识别】Java示例解析JSON转对象
希望对你有帮助