marionettejs/backbone.marionette — pull request #745 by AmIMeYet (2013-10-19 22:57:41+00:00)
Title: Do not use toJSON for data serialization in views

This is an updated version of #599 following @samccone's suggestions.

As per the Backbone documentation (see documentcloud/backbone#2134), do not use _model.toJSON_ or _collection.toJSON_ when rendering views. This allows developers to override _toJSON_ without affecting rendering. It was implemented by adding a _serializeModel_ method to View and a _serializeCollection_ method to ItemView mimicking Backbone's implementation of _toJSON_. Appropriate tests where added and the documentation was updated.