79548967

Date: 2025-04-01 19:12:14
Score: 1
Natty:
Report link

From what I know, there are two main ways to enforce for all of your date fields this behavior:

@Schema(description = "Reg date")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
private OffsetDateTime regDate;

- You can also try to configure Jackson globally, as I assume you're running this in Spring Boot. If I am correct, read this article for how you can do so: https://www.baeldung.com/spring-boot-customize-jackson-objectmapper. By configuring Jackson globally, you can avoid the need of annotating each individual field.

Reasons:
  • Blacklisted phrase (1): this article
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Andrei Grebla