Code example for Gson

Methods: fromJson

0
		if (isDebugEnabled) {
			startTime = System.currentTimeMillis();
		} 
		try { 
			String string = MySoup.scrape(url);
			Object o = gson.fromJson(string, t);
			if (isDebugEnabled) {
				endTime = System.currentTimeMillis();
				float totalTime = (endTime - startTime) / 1000f;
				debugString = "Load Time: " + String.valueOf(totalTime) + "\n\n" + o.toString();
			} 
			return o;
		} catch (Exception e) {
			e.printStackTrace();
			System.err.println("Couldn't create json object " + t.toString());
			return null; 
		} 
	} 
 
    /**