Should be straightforward in java - basically every endpoint has a response type that it returns instead of a string. In python the `dataclass` decorator can be used