Skip to content

Instantly share code, notes, and snippets.

@Devofure
Last active September 13, 2015 17:05
Show Gist options
  • Save Devofure/174c6694f2aa9cdcb40f to your computer and use it in GitHub Desktop.
Save Devofure/174c6694f2aa9cdcb40f to your computer and use it in GitHub Desktop.
example of gson using to convert from json to java object when fetching with OkHttp
public class ClojarsDependency {
@Expose
public long downloads;
@Expose @SerializedName("homepage")
public String url;
@Expose
public String description;
public String user;
@Expose @SerializedName("jar_name")
public String artifactName;
@Expose @SerializedName("group_name")
private String groupName;
@Expose @SerializedName("latest_version")
private String version;
@Expose @SerializedName("latest_release")
private String latestRelease;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment