File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/main/java/com/ibm/watson/developer_cloud/util Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1717import com .google .gson .GsonBuilder ;
1818
1919/**
20- * The Class GsonSingleton.
20+ * Gson singleton to be use when transforming from JSON to Java Objects and vise versa. It handles
21+ * date formatting and pretty print the result
2122 */
2223public class GsonSingleton {
2324
24- /** The Constant DATE_FORMAT_UTC. */
2525 private static final String DATE_FORMAT_UTC = "yyyy-MM-dd'T'HH:mm:ss.SSS" ;
26- /** The gson. */
2726 private static Gson gson ;
2827
2928 /**
3029 * Creates a {@link com.google.gson.Gson} object that can be use to serialize and deserialize Java
3130 * objects}
3231 *
33- * @return the gson
32+ * @return the Gson
3433 */
3534 private static Gson createGson () {
3635 return new GsonBuilder ().setPrettyPrinting ().setDateFormat (DATE_FORMAT_UTC ).create ();
3736 }
3837
3938 /**
40- * Gets the gson.
39+ * Gets the Gson instance
4140 *
42- * @return the gson
41+ * @return the Gson
4342 */
4443 public static Gson getGson () {
4544 if (gson == null ) {
You can’t perform that action at this time.
0 commit comments