js/libs/ember-data.js
function(type, hash, prop) {
    this.normalizeId(hash);
    this.normalizeAttributes(type, hash);
    this.normalizeRelationships(type, hash);

    this.normalizeUsingDeclaredMapping(type, hash);

    if (this.normalizeHash && this.normalizeHash[prop]) {
      this.normalizeHash[prop](hash);
    }

    return this._super(type, hash, prop);
  }
function(type, hash, prop) {
    this.normalizeId(hash);
    this.normalizeAttributes(type, hash);
    this.normalizeRelationships(type, hash);

    this.normalizeUsingDeclaredMapping(type, hash);

    if (this.normalizeHash && this.normalizeHash[prop]) {
      this.normalizeHash[prop](hash);
    }

    return this._super(type, hash, prop);
  }
If you want to do normalizations specific to some part of the payload, you
can specify those under `normalizeHash`.

For example, given the following json where the the `IDs` under
`"comments"` are provided as `_id` instead of `id`.

```javascript
{
"post": {
"id": 1,
"title": "Rails is omakase",
"comments": [ 1, 2 ]
},
"comments": [{
"_id": 1,
"body": "FIRST"
}, {
"_id": 2,
"body": "Rails is unagi"
}]
}
```

You use `normalizeHash` to normalize just the comments:

```javascript
App.PostSerializer = DS.RESTSerializer.extend({
normalizeHash: {
comments: function(hash) {
hash.id = hash._id;
delete hash._id;
return hash;
}
}
});
```

The key under `normalizeHash` is usually just the original key
that was in the original payload. However, key names will be
impacted by any modifications done in the `normalizePayload`
method. The `DS.RESTSerializer`'s default implemention makes no
changes to the payload keys.

@property normalizeHash
@type {Object}
@default undefined
 
Normalizes a part of the JSON payload returned by
the server. You should override this method, munge the hash
and call super if you have generic normalization to do.

It takes the type of the record that is being normalized
(as a DS.Model class), the property where the hash was
originally found, and the hash to normalize.

For example, if you have a payload that looks like this:

```js
{
"post": {
"id": 1,
"title": "Rails is omakase",
"comments": [ 1, 2 ]
},
"comments": [{
"id": 1,
"body": "FIRST"
}, {
"id": 2,
"body": "Rails is unagi"
}]
}
```

The `normalize` method will be called three times:

With `App.Post`, `"posts"` and `{ id: 1, title: "Rails is omakase", ... }`
With `App.Comment`, `"comments"` and `{ id: 1, body: "FIRST" }`
With `App.Comment`, `"comments"` and `{ id: 2, body: "Rails is unagi" }`

You can use this method, for example, to normalize underscored keys to camelized
or other general-purpose normalizations.

If you want to do normalizations specific to some part of the payload, you
can specify those under `normalizeHash`.

For example, if the `IDs` under `"comments"` are provided as `_id` instead of
`id`, you can specify how to normalize just the comments:

```js
App.PostSerializer = DS.RESTSerializer.extend({
normalizeHash: {
comments: function(hash) {
hash.id = hash._id;
delete hash._id;
return hash;
}
}
});
```

The key under `normalizeHash` is just the original key that was in the original
payload.

@method normalize
@param {subclass of DS.Model} type
@param {Object} hash
@param {String} prop
@returns {Object}