I'm parsing a JSON file with elements like this:
{
"text": "Burn off. Goulburn Mulwaree (974 Currawang Road, Gundary) at 5 Mar 2017 12:44 #NSWRFS #Burnoff #NSWFires",
"user": {
"id": "4721717942",
"name": "NSW Fire Updates"
},
"lang": "en",
"coordinates": {
"coordinates": [
149.67931151,
-34.83702803
],
"type": "Point"
},
"created_at": "Sun Mar 05 03:39:31 +0000 2017"
}
I have successfully parsed all the objects within this file.
But for the object created_at
, I want to make it into a ZonedTimeDate
type. SO that I can do operations on them. Currently I'm just using String
. Here is my current implementation:
public class Tweet {
private String created_at;
public Tweet() {
}
public String getCreated_at() {
return created_at;
}
public void setCreated_at(String created_at) {
this.created_at = created_at;
}
// Rest of class ...
}