I am using Grails 2.3 and I have a domain with a date field:
class DomainClass {
String title
Date datetime
}
And I have a json coming in to the RestfulController with timestamp in milliseconds:
{"title": "name", "datetime": 957044075522}
The controller is binding the title correctly but for the datetime field, it is actually an error:
Could not find matching constructor for: java.util.Date(com.google.gson.internal.LazilyParsedNumber)
What's the best way to fix this?
Thanks.