Code example for Gson

Methods: fromJson

0
	public void testLoadTemplate() throws FileNotFoundException, 
			ClassNotFoundException { 
		ReplacementRoot repl = new ReplacementRoot(
				"files/test/TestReplacementFile.xml"); 
		TemplateFiller filler = new TemplateFiller(repl);
		QuoteSet set = new Gson().fromJson(new FileReader(new File(
				"files/test/quotes.js")), QuoteSet.class); 
		String code = filler.fillTemplate(set);
		assertTrue(true); 
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java