¡@

Home 

2014/10/16 ¤W¤È 08:26:37

android Programming Glossary: tokener

How do I parse JSON from a Java HTTPResponse?

http://stackoverflow.com/questions/2845599/how-do-i-parse-json-from-a-java-httpresponse

builder new StringBuilder char buf new char 1000 int l 0 while l 0 builder.append buf 0 l l in.read buf JSONTokener tokener new JSONTokener builder.toString JSONArray finalResult new JSONArray tokener I'm on Android if that makes any difference... buf 0 l l in.read buf JSONTokener tokener new JSONTokener builder.toString JSONArray finalResult new JSONArray tokener I'm on Android if that makes any difference. java android json share improve this question Two things which can be.. builder new StringBuilder for String line null line reader.readLine null builder.append line .append n JSONTokener tokener new JSONTokener builder.toString JSONArray finalResult new JSONArray tokener If the JSON is actually a single line then..