Hi Greg,
Sounds like this is what you want: http://www.asp.net/web-api/overview/formats-and-model-binding/media-formatters You can define your own media formatter to customise your response for particular types Regards, Nelson Chan On 18 August 2015 at 20:04, Greg Keogh <[email protected]> wrote: > I would provide two different methods. It's easier for you and easier for >> the end developers to understand. >> > > In the end I sort of did that. It's best not to fight the system, so I > changed the method so that it simply returns a serialized object (a rather > complicated one), but no matter what format the request asks for I just let > the infrastructure pick the serializer and return it. I don't even tamper > with the shape of the JSON or XML that's returned. Yeah, *don't fight the > system* if you can avoid it! -- *GK* >
