Created
September 23, 2013 10:16
-
-
Save meeDamian/6668680 to your computer and use it in GitHub Desktop.
Simple download JSON example using koush/Ion
This file contains hidden or 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
| 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