1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 4× 4× | import JSONSerializer from 'ember-data/serializers/json' export default JSONSerializer.extend({ // ----- Overridden properties ----- primaryKey: 'user_id', // ----- Overridden methods ----- normalizeQueryResponse (store, primaryModelClass, payload, id, requestType) { const users = payload .split('\n') .filter(str => str.trim().length) // Remove blank lines .map(JSON.parse) return this._super(store, primaryModelClass, users, id, requestType) }, }) |