private/adapters/dev-fixtures.js
function (store, type, record, addId) {
    var json;
    type = this._parseModelOrType(store, type);
    json = record.serialize({includeId: true});
    if (!json.id && addId) {
      json.id = this.generateId(store, type);
    }
    type.eachRelationship(function (key, meta) {
      var records;
      if (!meta.async && meta.kind === 'hasMany' && (records = record.get(key)) && !json[key]) {
        json[key] = records.mapBy('id').filter(Boolean);
      }
    });
    return json;
  }
function (store, type, record, addId) {
    var json;
    type = this._parseModelOrType(store, type);
    json = record.serialize({includeId: true});
    if (!json.id && addId) {
      json.id = this.generateId(store, type);
    }
    type.eachRelationship(function (key, meta) {
      var records;
      if (!meta.async && meta.kind === 'hasMany' && (records = record.get(key)) && !json[key]) {
        json[key] = records.mapBy('id').filter(Boolean);
      }
    });
    return json;
  }
function ( store , type , record , addId ) { var json ; type = this . _parseModelOrType ( store , type ) ; json = record . serialize ( { includeId : true } ) ; if ( ! json . id && addId ) { json . id = this . generateId ( store , type ) ; } type . eachRelationship ( function ( key , meta ) { var records ; if ( ! meta . async && meta . kind === 'hasMany' && ( records = record . get ( key ) ) && ! json [ key ] ) { json [ key ] = records . mapBy ( 'id' ) . filter ( Boolean ) ; } } ) ; return json ; }
Generate the JSON for a record

@method mockJSON
@param {DS.Store} store
@param {subclass of DS.Model|string} type
@param {DS.Model} record
@param {boolean} [addId=false]
@return {Object}
Generate the JSON for a record