1. 程式人生 > >JSON作為入參怎麼取值

JSON作為入參怎麼取值

@RequestMapping(value = "/getMyHouseTypeList")
	@ResponseBody
	public Object getMyHouseTypeList(HttpServletRequest request) throws IOException {
		//獲取引數
		BufferedReader br = request.getReader();
		String str, id = "";
		while((str = br.readLine()) != null){
			id += str;
		}

		//當前使用者
		String phone=JSONObject.fromObject(id).get("phone").toString();