Code example for JsonWriter

0
		Bundle extras = new Bundle();
		extras.putString("formatted_address", "Formatted, pretty Dummy Address");
		dummy.setExtras(extras);
		 
		StringWriter sWriter = new StringWriter();
		JsonWriter jWriter = new JsonWriter(sWriter);
		Util.writeAddress(jWriter, dummy);
		String json = sWriter.toString();
		try { 
			sWriter.close();
		} catch (IOException e) {
			fail("IOException when closing the StringWriter");
		} 
		assertNotNull(json);
		System.out.println(json);
	} 
	 
	public void testAddressToJsonExternal() { 
		Address dummy = new Address(Locale.getDefault());
		dummy.setFeatureName("Dummy Address");
		dummy.setLatitude(30.12345);