> > 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*
