There is a WebApi
which was written by .Net and format DateTime on its JSON in this form:
"/Date(1511034890677+0330)/"
I'm getting this on Android and deserializing by Gson.
But the date is deserialize as a String
. I'm able to parse the dateString to Java Date
by SubString and add values together but is there a built-in class which can do the job on-the-fly e.g. by Gson or Java?
Edit 1: This is not duplicate of how to convert incoming Json date into java date format? as I mentioned in comments, I'm looking for a way to convert the date upon deserialization using Gson or Java.