Support for different serializer depending on request

Have added some support for taking care of backwards compatibility. This is missing tests though, can't work out a good approach for that yet.