You can use GSON to parse the JSON response to your Java Class Object
private Gson gson;
GsonBuilder gsonBuilder = new GsonBuilder();
gson = gsonBuilder.create();
//If your response id JSON array
AndroidNetworking.get("your_url")
.build()
.getAsJSONArray(new JSONArrayRequestListener() {
@Override
public void onResponse(JSONArray response) {
//For JSON array Response
List<YourModel> responseArray = Arrays.asList(gson.fromJson(response, YourModel[].class));
}
@Override
public void onError(ANError error) {
// handle error
}
});
//If your response is JSON object
AndroidNetworking.post("your_url")
.build()
.getAsJSONObject(new JSONObjectRequestListener() {
@Override
public void onResponse(JSONObject response) {
//For JSON object response
YourModel responseObject = gson.fromJson(response, YourModel.class);
}
@Override
public void onError(ANError error) {
// handle error
}
});