My application is integrated with some external service and makes requests to that service for data. I am just wondering what is the best practice for modelling the responses on the client side, especially in case when client business logic require only some peace of data. I am considering following implementations:
I would do the second.
converting JSON to class object which contains only those data/properties which are needed for further processing
It does not make sense to use data which is not needed. It makes only confusion. I would rather use multiple classes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.