jsonWorkflowBean是json字符串
// 转换成Json对象
JSONObject jsonObj = JSONObject.fromObject(jsonWorkflowBean);/*
* 在JSONObject.toBean的时候如果转换的类中有集合,可以先定义Map<String, Class> classMap
* = new HashMap<String,
* Class>();在classMap中put你要转换的类中的集合名,像:classMap.put("teachers",
* Teacher.class);然后在toBean()的时候把参数加上, 像:Student student=(Student)
* JSONObject.toBean(str, Student.class, classMap);
*/
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put("inputDataList", InputDataBean.class);
classMap.put("imageList", ImageBean.class);
//将json转换成workflowBean
WorkflowBean workflow = (WorkflowBean) JSONObject.toBean(jsonObj,
WorkflowBean.class, classMap);