Last active
May 29, 2016 21:40
-
-
Save keerthikorrapati/9b14b60945dd1f45cab2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@JSONObject | |
public class Slideshow { | |
@JsonField(name = "id") | |
int mSlideshowId; | |
@JsonField(name = "created_at") | |
long mCreatedAt; | |
@JsonField(name = "title") | |
String mTitle; | |
@JsonField(name = "user_id") | |
int mUserId; | |
@JsonField(name = "author_login") | |
String mUserLogin; | |
/* | |
* Optional callback method to do something when your | |
* object is done parsing. | |
*/ | |
@OnJsonParseComplete | |
void onParseComplete() { | |
mCreatedAt = mCreatedAt / 1000; | |
} | |
// parse the JSON formatted network response into Slideshow object | |
public void parseSlideshowFromNetwork(InputStream is) { | |
Slideshow slideshow = LoganSquare.parse(is, Slideshow.class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment