aboutsummaryrefslogtreecommitdiffstats
path: root/gson/src/main/java/org/onap/policy/common/gson/LocalDateTimeTypeAdapter.java
AgeCommit message (Collapse)AuthorFilesLines
2021-02-18Remove duplicate code from type adaptersJim Hahn1-36/+3
Extracted a common superclass, StringTypeAdapter, out of the gson type adapter classes. Issue-ID: POLICY-2914 Change-Id: I4bbd2a6e8372e7f42c4952ba9ff03eed97473fb2 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-30Generalize LocalDateTimeTypeAdapterJim Hahn1-4/+12
The GSON DateTime type adapter uses a hard-coded formatter. Generalized it to allow a different formatter to be provided to the constructor. Issue-ID: POLICY-2903 Change-Id: Icdd51190f465bc4c73cd593d6d1b2003165a4b60 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-03Add gson adapters for special field typesJim Hahn1-0/+64
Added type adapters for Instant, LocalDateTime, and ZonedDateTime. UUID seems to work already. Added new Coder that offers an alternative encoding for Instant. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I5230fa7fe955d78c5f2da1316cb1504b5875ea84