Skip to content

Instantly share code, notes, and snippets.

@meeDamian
Created September 23, 2013 10:16
Show Gist options
  • Save meeDamian/6668680 to your computer and use it in GitHub Desktop.
Save meeDamian/6668680 to your computer and use it in GitHub Desktop.
Simple download JSON example using koush/Ion
Ion.with(this, "http://your-url.com/file.json")
.asJsonObject()
.setCallback(new FutureCallback<JsonObject>() {
@Override
public void onCompleted(Exception e, JsonObject result) {
if( e!=null ) {} // do stuff on fail
if( json!=null ) {} // do stuff on success
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment