how can i get specific data from api requests without creating data classes?

If I understand your question correctly, you just want to extract data from that JSON string. You can do that with:

JSONArray dataArray;
try {
    dataArray = new JSONObject(yourString).optJSONArray("data");
} catch (JSONException e) {
    // whatever
for (int i = 0; i < dataArray.length(); ++i) {
    // do whatever you want with each object:
    String name = dataArray.optJSONObject(i).optString("name");

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top