Serialize JSON into Ember-Data (two different models in payload)
问题 I have JSON coming from the server which looks like: data: { user: { address: { id: "id", city: "city", street: "street", ....... } name: "name", ...... } authentication: { token: "token", id: "id" } } In Ember I have a model auth which should represent the authentication model that I get from the server. Since I have different names for same model on the server and in the Ember store, I wrote a serializer with one method typeForRoot(root) where I just map server authentication to Ember auth