public JSONObject getObjectPromotion(String id) {
HPromotion promotion=this.promotionDAO.getObject(Long.parseLong(id));
JSONObject jsonFavorite = new JSONObject();
EntityConversionJSON entityConversionJSON = new EntityConversionJSON();
JSONObject obj = entityConversionJSON.entityToJSON(promotion, jsonFavorite);
return obj;
}
然后报错,好像不接受JSONObject 这种类型,我还想看看JSON的值,不晓得如何打印查看
promotionService.getObjectPromotion(id,function(EcouponInfo){
var json = eval("("+EcouponInfo+")");
}
EcouponInfo为会带参数,也是JSON的值。