My JSON object looks like
{"iso":"2014-01-01T21:13:00.000Z","__type":"Date"}
I need to get the date from it as a date Object. What I have tried-
String dateStr = JsonObject.getString("iso"); //output is 2014-01-01T21:13:00.000Z
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date birthDate = sdf.parse(dateStr);
but this doesnt work, firstly it prompts me to add a try/catch which I do. When the debugger comes to Date birthDate = sdf.parse(dateStr); it just skips this.
How do I get a date out of my JSON object?