Package com.dslplatform.json
Class JavaTimeConverter
java.lang.Object
com.dslplatform.json.JavaTimeConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonReader.ReadObject<OffsetDateTime> static final JsonWriter.WriteObject<OffsetDateTime> static final JsonReader.ReadObject<LocalDate> static final JsonReader.ReadObject<LocalDateTime> static final JsonWriter.WriteObject<LocalDateTime> static final JsonWriter.WriteObject<LocalDate> static final JsonReader.ReadObject<LocalTime> static final JsonWriter.WriteObject<LocalTime> static final OffsetDateTimestatic final LocalDatestatic final LocalDateTimestatic final LocalTimestatic final OffsetTimestatic final JsonReader.ReadObject<OffsetTime> static final JsonWriter.WriteObject<OffsetTime> private static final JsonReader.ReadObject<Date> private static final JsonReader.ReadObject<Timestamp> private static final JsonReader.ReadObject<Date> static final JsonReader.ReadObject<ZonedDateTime> static final JsonWriter.WriteObject<ZonedDateTime> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanallDigits(char[] buffer, int start, int end) static OffsetDateTimedeserializeDateTime(JsonReader reader) static ArrayList<OffsetDateTime> static voiddeserializeDateTimeCollection(JsonReader reader, Collection<OffsetDateTime> res) static ArrayList<OffsetDateTime> static voidstatic LocalDatedeserializeLocalDate(JsonReader reader) static voiddeserializeLocalDateCollection(JsonReader reader, Collection<LocalDate> res) static voiddeserializeLocalDateNullableCollection(JsonReader reader, Collection<LocalDate> res) static LocalDateTimedeserializeLocalDateTime(JsonReader reader) static ArrayList<LocalDateTime> static voiddeserializeLocalDateTimeCollection(JsonReader reader, Collection<LocalDateTime> res) static ArrayList<LocalDateTime> static voidstatic LocalTimedeserializeLocalTime(JsonReader reader) static voiddeserializeLocalTimeCollection(JsonReader reader, Collection<LocalTime> res) static voiddeserializeLocalTimeNullableCollection(JsonReader reader, Collection<LocalTime> res) static OffsetTimedeserializeOffsetTime(JsonReader reader) private static intreadNanos(char[] tmp, int len, int offset) (package private) static <T> voidregisterDefault(DslJson<T> json) static voidserialize(LocalDate value, JsonWriter sw) static voidserialize(LocalDateTime value, JsonWriter sw) static voidserialize(LocalTime value, JsonWriter sw) static voidserialize(OffsetDateTime value, JsonWriter sw) static voidserialize(OffsetTime value, JsonWriter sw) static voidserializeNullable(LocalDate value, JsonWriter sw) static voidserializeNullable(LocalDateTime value, JsonWriter sw) static voidserializeNullable(LocalTime value, JsonWriter sw) static voidserializeNullable(OffsetDateTime value, JsonWriter sw) static voidserializeNullable(OffsetTime value, JsonWriter sw) private static intwriteNano(byte[] buf, int offset, int nano) private static voidwriteTimezone(int position, ZoneOffset zone, JsonWriter sw)
-
Field Details
-
MIN_LOCAL_DATE_TIME
-
MIN_DATE_TIME_UTC
-
MIN_LOCAL_DATE
-
MIN_LOCAL_TIME
-
MIN_TIME_UTC
-
LOCAL_DATE_READER
-
LOCAL_DATE_WRITER
-
LOCAL_TIME_READER
-
LOCAL_TIME_WRITER
-
OFFSET_TIME_READER
-
OFFSET_TIME_WRITER
-
DATE_TIME_READER
-
DATE_TIME_WRITER
-
LOCAL_DATE_TIME_READER
-
LOCAL_DATE_TIME_WRITER
-
ZONED_DATE_TIME_READER
-
ZONED_DATE_TIME_WRITER
-
UTIL_DATE_READER
-
SQL_DATE_READER
-
SQL_TIMESTAMP_READER
-
-
Constructor Details
-
JavaTimeConverter
public JavaTimeConverter()
-
-
Method Details
-
registerDefault
-
serializeNullable
-
serializeNullable
-
serializeNullable
-
serializeNullable
-
serialize
-
writeNano
private static int writeNano(byte[] buf, int offset, int nano) -
serialize
-
serialize
-
serialize
-
writeTimezone
-
allDigits
private static boolean allDigits(char[] buffer, int start, int end) -
deserializeDateTime
- Throws:
IOException
-
readNanos
private static int readNanos(char[] tmp, int len, int offset) -
deserializeLocalDateTime
- Throws:
IOException
-
deserializeLocalTime
- Throws:
IOException
-
deserializeOffsetTime
- Throws:
IOException
-
deserializeDateTimeCollection
public static ArrayList<OffsetDateTime> deserializeDateTimeCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeDateTimeCollection
public static void deserializeDateTimeCollection(JsonReader reader, Collection<OffsetDateTime> res) throws IOException - Throws:
IOException
-
deserializeDateTimeNullableCollection
public static ArrayList<OffsetDateTime> deserializeDateTimeNullableCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeDateTimeNullableCollection
public static void deserializeDateTimeNullableCollection(JsonReader reader, Collection<OffsetDateTime> res) throws IOException - Throws:
IOException
-
deserializeLocalDateTimeCollection
public static ArrayList<LocalDateTime> deserializeLocalDateTimeCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeLocalDateTimeCollection
public static void deserializeLocalDateTimeCollection(JsonReader reader, Collection<LocalDateTime> res) throws IOException - Throws:
IOException
-
deserializeLocalDateTimeNullableCollection
public static ArrayList<LocalDateTime> deserializeLocalDateTimeNullableCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeLocalDateTimeNullableCollection
public static void deserializeLocalDateTimeNullableCollection(JsonReader reader, Collection<LocalDateTime> res) throws IOException - Throws:
IOException
-
deserializeLocalTimeCollection
public static ArrayList<LocalTime> deserializeLocalTimeCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeLocalTimeCollection
public static void deserializeLocalTimeCollection(JsonReader reader, Collection<LocalTime> res) throws IOException - Throws:
IOException
-
deserializeLocalTimeNullableCollection
public static ArrayList<LocalTime> deserializeLocalTimeNullableCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeLocalTimeNullableCollection
public static void deserializeLocalTimeNullableCollection(JsonReader reader, Collection<LocalTime> res) throws IOException - Throws:
IOException
-
serializeNullable
-
serialize
-
deserializeLocalDate
- Throws:
IOException
-
deserializeLocalDateCollection
public static ArrayList<LocalDate> deserializeLocalDateCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeLocalDateCollection
public static void deserializeLocalDateCollection(JsonReader reader, Collection<LocalDate> res) throws IOException - Throws:
IOException
-
deserializeLocalDateNullableCollection
public static ArrayList<LocalDate> deserializeLocalDateNullableCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeLocalDateNullableCollection
public static void deserializeLocalDateNullableCollection(JsonReader reader, Collection<LocalDate> res) throws IOException - Throws:
IOException
-