ServiceFees serviceFees = serviceFeesService.fetch(id);
serviceFeesService.fetchLinks(serviceFees,"serviceFeeItemList");
req.setAttribute("serviceFees",serviceFees);
String source ="[]";
if(Lang.isNotEmpty(serviceFees) && Lang.isNotEmpty(serviceFees.getServiceFeeItemList())){
// source = Json.toJson(serviceFees.getServiceFeeItemList());
source = JSON.toJSONString(serviceFees.getServiceFeeItemList());
}
req.setAttribute("source", source);
source = Json.toJson(serviceFees.getServiceFeeItemList());
页面报错了;
source = JSON.toJSONString(serviceFees.getServiceFeeItemList());
还能输出日志
JSON 转换 " 怎么处理呢 求指点
[{"createBy":"1","createTime":1565602210000,"id":"3bd113782950422ca80e79fef0413b59","name":"半年付","rate":1.0,"serviceFeesId":"7278ffb0d1ab4f5f997616d6d90709c8","updateBy":"1","updateTime":1565602210000,"value":6},{"createBy":"1","createTime":1565602210000,"id":"87bafc6b0a554af89320ae95fc1ef6ad","name":"季付","rate":1.0,"serviceFeesId":"7278ffb0d1ab4f5f997616d6d90709c8","updateBy":"1","updateTime":1565602210000,"value":3},{"createBy":"1","createTime":1565602211000,"id":"883433f0eda54aaf8fe3c9fe0e0141b8","name":"2年付","rate":1.0,"serviceFeesId":"7278ffb0d1ab4f5f997616d6d90709c8","updateBy":"1","updateTime":1565602211000,"value":24},{"createBy":"1","createTime":1565602210000,"id":"d84c61fd82d2407e98d47a9412d0ca64","name":"月付","rate":1.0,"serviceFeesId":"7278ffb0d1ab4f5f997616d6d90709c8","updateBy":"1","updateTime":1565602210000,"value":1},{"createBy":"1","createTime":1565602210000,"id":"dec30ab98399431987f66e04637c18cc","name":"年付","rate":1.0,"serviceFeesId":"7278ffb0d1ab4f5f997616d6d90709c8","updateBy":"1","updateTime":1565602210000,"value":12}]