I have a Contact class with a created
Date property. I'm attempting to do the following:
Contact received = gson.fromJson(contactJson, Contact.class);
However I get the exception:
com.google.gson.JsonSyntaxException: 1433444958703
at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:81)
at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:66)
There is a similar solution to this posted already: "Unparseable date: 1302828677828" trying to deserialize with Gson a millisecond-format date received from server
However it does not work for me (Will not compile).
Gson version 2.3.1
Thoughts?
TIA, - Ole