A
A
Alina Mitrokhina2020-03-05 15:38:54
Android
Alina Mitrokhina, 2020-03-05 15:38:54

Need advice. How to create an acceptable response structure for json parsing?

From the server, making a request https://api.spacexdata.com/v3/launches/next , I get a response in json format. I would like to create a competent structure of models for the answer. It's just too much nesting in my case. Make a BaseResponse class. At the moment, the display code looks like this, which is really terrible, interferes with reading and can cause crashes during operation. Any advice on how to get rid of such index requests and get for each request only the fields that are needed to be displayed in the UI?

5e60f23723b63982257663.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question