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