Added an optional mode for RFC 7231 compliance. The Content-Type header is used to signal the format of the request body, the Accept header is used to negotiate the content type the client wants. Unfortunately for our needs these are sometimes different, but Catalyst::Controller::REST assumes they always match.
This adds a separation between the Serializer and Deserializer when desired. As well, a separate set of mappings for the deserializer content types is allowed. Probably not the most eligant solution but hopefully doesn't break backwards compatibility for those wanting or expecting the current behaviour.
If you have ideas on a better way to do this, I'm open to suggestions on improvements. Thanks.