File tree Expand file tree Collapse file tree
components/serialization/json/src/main/java/com/microsoft/kiota/serialization Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import java .time .LocalTime ;
1515import java .time .OffsetDateTime ;
1616import java .time .ZoneOffset ;
17+ import java .time .format .DateTimeFormatter ;
1718import java .time .format .DateTimeParseException ;
1819import java .util .Base64 ;
1920
@@ -44,7 +45,7 @@ public OffsetDateTime read(JsonReader in) throws IOException {
4445
4546 @ Override
4647 public void write (JsonWriter out , OffsetDateTime value ) throws IOException {
47- out .value (value .toString ( ));
48+ out .value (value .format ( DateTimeFormatter . ISO_ZONED_DATE_TIME ));
4849 }
4950 };
5051
@@ -67,7 +68,7 @@ public LocalDate read(JsonReader in) throws IOException {
6768
6869 @ Override
6970 public void write (JsonWriter out , LocalDate value ) throws IOException {
70- out .value (value .toString ( ));
71+ out .value (value .format ( DateTimeFormatter . ISO_LOCAL_DATE ));
7172 }
7273 };
7374
@@ -90,7 +91,7 @@ public LocalTime read(JsonReader in) throws IOException {
9091
9192 @ Override
9293 public void write (JsonWriter out , LocalTime value ) throws IOException {
93- out .value (value .toString ( ));
94+ out .value (value .format ( DateTimeFormatter . ISO_LOCAL_TIME ));
9495 }
9596 };
9697
You can’t perform that action at this time.
0 commit comments