Code example for Gson

Methods: fromJson

		// Create a response handle 
		ResponseHandler<String> responseHandler = new BasicResponseHandler();
		String responseBody = ""; /*!<Store response from server*/
		try { 
			responseBody = httpclient.execute(httpget, responseHandler); 
			Gson gson = new Gson();
			Data obj = new Data();
			obj = gson.fromJson(responseBody, Data.class); /*!<Parse through JSON that is returned*/
			hotspots = obj.getHotspots(); 
		}catch(Exception e){
			Toast.makeText(ConnectorService.this, "Server is unreachable...", Toast.LENGTH_LONG);
		//Close connection 
	 * @author Rohan Balakrishnan 
Connect your IDE to all the code out there  Get Codota for Java