O'Reilly logo
  • Gerald Gillespie thinks this is interesting:

you need to decide whether you will follow this approach to serialize the model or implement server-side interaction separately

From

Cover of Backbone.js Patterns and Best Practices

Note

what not implement toJSON() with an optional argument?

user.toJSON =  function (convenience) {
  if (convenience === undefined){
      var newobj =  {
          user: _.clone(this.attributes)
      }
    }
    else {
    newobj = _.clone(this.attributes);
    }
        return newobj;
};