I am getting this JSON from mongoDB
{
"_id" : ObjectId("4f95bbe3742b1eaa929b81ef"),
"empNo" : NumberLong(10),
"empName" : "abc",
"joinDate" : ISODate("2012-04-23T20:30:27.421Z"),
"address" : {
"addNo" : NumberLong(1),
"addLocation" : "add0",
"street" : {
"sNo" : NumberLong(10),
"sName" : "Street 1"
}
}
}
I want to convert ISODate("2012-04-23T20:30:27.421Z")
to Java Date.
I am getting an error while converting the JSON to Object using Google's Gson Library when Date Atribute is there.
What is the correct way to do this?