0

Incoming JSON:

{
"start_date": 12345
},
{
"start_date": 12345
},

ItemDTO:

public class ItemDto {
  Long start_date;
}

[TODO] Transform the start_date field to date

Outgoing JSON:

{
"date": 12345
},
{
"date": 12345
},

How would I go about accomplishing the TODO part of this process? I've tried using @JsonProperty on the variable and on the getters and setters.

Rawr
  • 2,206
  • 3
  • 25
  • 53
  • Your approach using the ```@JsonProperty``` on getters and setters is correct, what did you get? – jbarrueta Mar 11 '16 at 01:56
  • It didn't properly set the value. I'll try again. – Rawr Mar 11 '16 at 07:59
  • I believe I was using the same method name and the duplicate answer seems to indicate that you need to name them different so Jackson parses them separately. – Rawr Mar 11 '16 at 08:53

0 Answers0