This is a question bothers me quite often. Every time I need to make the HTTP requests in JSON format I need to create classes for request and response. I still have no concrete idea how the payload classes should be placed. I’ve tried to write as an inner class of the class that needs the class as payload, usually, it turned out there are other classes that need to use the payload.
I would like to know if there is a better practice for placing the payload classes.