If you're asking should you write code like this:
if(isXML()) {
...
} else if (isJSON()) {
..
}
then I'd say I'm against it. Off the top of my head, I think I like a channel abstraction.
That is, you build an input and output channels containing the appropriate de/serialisers to match your Content-Type and Accept headers. The business logic at the top of the channels should deal in an abstract form like a request/response hash map or tree.
Does that make sense?
Jim