spray/spray — Issue #56: (un)marshaling versioning support
Author: onejigtwo
Created: 2011-11-09 17:15:07+00:00
State: open

Provide the ability for marshallers and unmarshallers to be registered not only for the request's content type but also for a particular URI match.

This would allow marshallers / unmarshallers to be registered for different message versions in case the message format needs to be changed or upgraded to a new strucutre, but the old message format is still accessible through a different URI.

For example, the twitter API has a version number included in the beginning the URI path.
https://api.twitter.com/1/statuses/show/.json
The Twitter API version above is 1, included as the first part of the URI.

The appropriate marshalling or unmarshalling version would be chosen according to the version.

You cannot currently choose the appropriate marshaller/unmarshaller according to the URI path in Spray.