I am converting InputStream to JSONObject using following code. My question is, is there any simple way to convert InputStream to JSONObject. Without doing InputStream -> Bu
This code works
BufferedReader bR = new BufferedReader( new InputStreamReader(inputStream));
String line = "";
StringBuilder responseStrBuilder = new StringBuilder();
while((line = bR.readLine()) != null){
responseStrBuilder.append(line);
}
inputStream.close();
JSONObject result= new JSONObject(responseStrBuilder.toString());