dist/ember-json-api.js
function(payload) {
        if(!payload) {
          return {};
        }

        var data = payload[this.primaryRecordKey];
        if (data) {
          if (Ember.isArray(data)) {
            this.extractArrayData(data, payload);
          } else {
            this.extractSingleData(data, payload);
          }
          delete payload[this.primaryRecordKey];
        }
        if (payload.meta) {
          this.extractMeta(payload.meta);
          delete payload.meta;
        }
        if (payload.links) {
          // FIXME Need to handle top level links, like pagination
          delete payload.links;
        }
        if (payload[this.sideloadedRecordsKey]) {
          this.extractSideloaded(payload[this.sideloadedRecordsKey]);
          delete payload[this.sideloadedRecordsKey];
        }

        return payload;
      }
function(payload) {
        if(!payload) {
          return {};
        }

        var data = payload[this.primaryRecordKey];
        if (data) {
          if (Ember.isArray(data)) {
            this.extractArrayData(data, payload);
          } else {
            this.extractSingleData(data, payload);
          }
          delete payload[this.primaryRecordKey];
        }
        if (payload.meta) {
          this.extractMeta(payload.meta);
          delete payload.meta;
        }
        if (payload.links) {
          // FIXME Need to handle top level links, like pagination
          delete payload.links;
        }
        if (payload[this.sideloadedRecordsKey]) {
          this.extractSideloaded(payload[this.sideloadedRecordsKey]);
          delete payload[this.sideloadedRecordsKey];
        }

        return payload;
      }
function ( payload ) { if ( ! payload ) { return { } ; } var data = payload [ this . primaryRecordKey ] ; if ( data ) { if ( Ember . isArray ( data ) ) { this . extractArrayData ( data , payload ) ; } else { this . extractSingleData ( data , payload ) ; } delete payload [ this . primaryRecordKey ] ; } if ( payload . meta ) { this . extractMeta ( payload . meta ) ; delete payload . meta ; } if ( payload . links ) { // FIXME Need to handle top level links, like pagination delete payload . links ; } if ( payload [ this . sideloadedRecordsKey ] ) { this . extractSideloaded ( payload [ this . sideloadedRecordsKey ] ) ; delete payload [ this . sideloadedRecordsKey ] ; } return payload ; }
Extract top-level "meta" & "links" before normalizing.
Extract top - level meta & links before normalizing .