I have a use caes where I do return a suitable object according for the negotiated content type.
In my case I accept JSON and XML. When JSON is returned to the client I produce a Map, when XML is returned I produce a custom object.
There is no way to determine easily which content type will be written out to the client. With examining the Accept header and iterating over registered message converters.
I have a work around which looks like this:
I would rather have: