String从中获取JSONObject并将其设置String为Response.像下面的东西 -
String
JSONObject
Response
object = new JSONObject(); object.put("Name", "Bryan"); object.put("Age", "27"); response = Response.status(Status.OK).entity(object.toString()).build();