示例#1
0
 @Get(contentType = "application/json")
 public JsonResult renderMusicianJson(Musician musician) throws UnsupportedEncodingException {
   return JsonResult.returnData(musician);
 }
示例#2
0
 public static JsonResult returnData(String href, Object data) {
   JsonResult r = new JsonResult(true);
   r.setData(data);
   r.setNextHref(href);
   return r;
 }
示例#3
0
 public static JsonResult returnData(Object data) {
   JsonResult r = new JsonResult(true);
   r.setData(data);
   return r;
 }
示例#4
0
 public static JsonResult fieldError(String field, String fieldMessage) {
   JsonResult r = new JsonResult(false, "Validation error");
   r.addFieldMessage(field, fieldMessage);
   return r;
 }