Code example for JsonParser

Methods: parse

			DefaultHttpClient httpclient = new DefaultHttpClient();
			HttpGet request = new HttpGet(query);
			request.setHeader("Accept", "application/json");
			request.setHeader("Accept-Encoding", "gzip");
			HttpResponse response = httpclient.execute(request);
			JsonParser parser = new JsonParser();
			return (JsonObject) parser.parse(response.toString());
		} catch (Exception e) {
			return null; 
	 * @param args 
	 * @throws IOException 
	 * @throws ClientProtocolException 
	 * @throws InterruptedException 
	public static void main(String[] args) throws ClientProtocolException, IOException, InterruptedException {
		String URL;
Connect your IDE to all the code out there  Get Codota for Java