Allow serializer to change codec