How to deserialise .NET JsonResult DateTime format with Gson in Android?
问题 I have a JSON returned from server in this format: { "StartDate": "/Date(1451593800000)/", "EndDate": "/Date(1483216200000)/" } And in my POJO: public class Data { java.util.Date startDate; java.util.Date endDate; } And my Gson object: private final Gson gson = new GsonBuilder() .serializeNulls() .setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE) .create(); When I wanted to parse this JSON I get this error: Unparseable date: "/Date(1483216200000)/" (at offset 0) What is the right way