For mapping my backbone models to what I get from the server I am using a technique described on the GroupOn Dev blog: <https://engineering.groupon.com/2012/javascript/extending-backbone-js-to-map-rough-api-responses-into-beautiful-client-side-models/>

However, this only maps incoming data to the model.

I would like this to go both ways, so that when I save a model, it prepares the models attributes to match the servers model.

What would be the best solution to prepare the output of the model?