Handle different JSON response types from same endpoint in RetroFit
问题 I need help. I have an endpoint that takes a parameter. Depending on this parameter, the JSON returned will be completely different. Is it possible for RetroFit to handle this? For example: http://myserver.com/all/<parameter> where parameter is BUS or BICYCLE , as well as adding others later. An example BUS request will return: "stops": [{ "Lat": "....", "Lng": "....", "Name": "Main Street", "Route": "", "StopNumber": "2" }] The BICYCLE endpoint will return: "stops": [{ "address": "Town