@@ -0,0 +1,954 @@
+import org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.io.Reader;%0Aimport java.net.URL;%0Aimport java.nio.charset.Charset;%0A%0Apublic class JsonParser %7B%0A%0A    public static JSONObject readJsonFromUrl(String url) throws IOException, JSONException %7B%0A        InputStream is = new URL(url).openStream();%0A        try  %7B%0A            BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(%22UTF-8%22)));%0A            String jsonText = readAll(rd);%0A            return new JSONObject(jsonText);%0A        %7D finally %7B%0A            is.close();%0A        %7D%0A    %7D%0A%0A    private static String readAll(Reader rd) throws IOException %7B%0A        StringBuilder sb = new StringBuilder();%0A        int cp;%0A        while ((cp = rd.read()) != -1) %7B%0A            sb.append((char) cp);%0A        %7D%0A        return sb.toString();%0A    %7D%0A%0A%7D%0A

Create JsonParser.java