Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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
You can’t perform that action at this time.