See gh-43498
This commit is contained in:
Johnny Lim
2024-12-13 23:40:38 +09:00
committed by Phillip Webb
parent e62bda9c04
commit 4d15ee5bf0
12 changed files with 52 additions and 50 deletions

View File

@@ -59,7 +59,7 @@ public class ExampleJsonComponent {
protected ExampleCustomObject deserializeObject(JsonParser jsonParser, DeserializationContext context,
ObjectCodec codec, JsonNode tree) throws IOException {
String value = nullSafeValue(tree.get("value"), String.class);
Date date = nullSafeValue(tree.get("date"), Integer.class, Date::new);
Date date = nullSafeValue(tree.get("date"), Long.class, Date::new);
UUID uuid = nullSafeValue(tree.get("uuid"), String.class, UUID::fromString);
return new ExampleCustomObject(value, date, uuid);
}