Code example for GsonBuilder

Methods: setDateFormat

0
 
public class GsonFactory 
{ 
	static public Gson createGson()
	{ 
		final GsonBuilder builder = new GsonBuilder();
		final Gson gson = builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss-'07:00'")
						.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
						.create();
		return gson;
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java