js/libs/ember-data.js
function(options) {
    // container is for lazy transform lookups
    var serializer = DS.JSONSerializer.create({ container: this.container });
    return serializer.serialize(this, options);
  }
function(options) {
    // container is for lazy transform lookups
    var serializer = DS.JSONSerializer.create({ container: this.container });
    return serializer.serialize(this, options);
  }
Use [DS.JSONSerializer](DS.JSONSerializer.html) to
get the JSON representation of a record.

`toJSON` takes an optional hash as a parameter, currently
supported options are:

- `includeId`: `true` if the record's ID should be included in the
JSON representation.

@method toJSON
@param {Object} options
@returns {Object} A JSON representation of the object.