實現 獲取json字符串轉換爲本地對象 並返回jsonjava
/** * 傳來的json字符串對象 ------》直接轉換爲本系統對象 * @param request * @param telecom * @return */ @RequestMapping(value = "/json/entry", method = RequestMethod.POST) public @ResponseBody MsgResult receiveAndreturnbackObject(HttpServletRequest request, @RequestBody User user) { MsgResult result = new MsgResult(); //對User 實體類的操做(獲取的User對象是從別的系統獲取的json字符串) return result; //返回的是json }