正常json文件无法打开的处理
This commit is contained in:
parent
899a7e6e56
commit
63b1b82e36
Binary file not shown.
@ -124,13 +124,16 @@ public class CoeDesignerDefaultDao {
|
||||
}
|
||||
model.setDefinition(define);
|
||||
|
||||
JSONObject definition = new JSONObject();
|
||||
try {
|
||||
JSONObject definition = JSONObject.parseObject(define);
|
||||
definition = JSONObject.parseObject(model.getDefinition());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
/*System.out.println("-----------错误信息输出Start-----------");
|
||||
SDK.getLogAPI().consoleErr(define);
|
||||
System.out.println("-----------错误信息输出End-----------");*/
|
||||
System.out.println("-----------错误信息输出Start-----------");
|
||||
// 数据源
|
||||
SDK.getLogAPI().consoleErr("model.getDefinition():" + model.getDefinition());
|
||||
SDK.getLogAPI().consoleErr("definition.toString():" + definition.toString());
|
||||
System.out.println("-----------错误信息输出End-----------");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -296,9 +296,7 @@ public class CoeDesignerUtil {
|
||||
* @return
|
||||
*/
|
||||
public static String getUpdateTime(String jsonObj) {
|
||||
com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(jsonObj);
|
||||
// JSONObject json = JSONObject.fromObject(jsonObj);
|
||||
// return json.optString("updateTime");
|
||||
JSONObject json = JSONObject.parseObject(jsonObj);
|
||||
if (json.containsKey("updateTime")) {
|
||||
return json.getString("updateTime");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user