从request对象中获取请求json格式的参数

2021-04-02 01:25

阅读:482

标签:obj   buffere   end   amr   对象   adl   buffered   stringbu   puts   

BufferedReader streamReader = new BufferedReader( new InputStreamReader(request.getInputStream(), "UTF-8"));
StringBuilder responseStrBuilder = new StringBuilder();
String inputStr;
while ((inputStr = streamReader.readLine()) != null){
responseStrBuilder.append(inputStr);
}
JSONObject jsonObject = JSONObject.parseObject(responseStrBuilder.toString());

从request对象中获取请求json格式的参数

标签:obj   buffere   end   amr   对象   adl   buffered   stringbu   puts   

原文地址:https://www.cnblogs.com/xr210/p/14603295.html


评论


亲,登录后才可以留言!