I receive a JSON from our API that has the following format
[
{
\"id\": 45,
\"name\": \"Pasta\",
\"_order\": 0,
\"is_hidden\": null,
\
In general, you'll probably want to implement a couple of methods in your serializer if you have to tweak your JSON:
App.ApplicationSerializer = DS.RESTSerializer.extend({
normalize: function(type, hash, prop) {
// change your incoming JSON to ember-style here
},
serialize: function(record, options) {
// change your outgoing ember-data record to your server's JSON here
}
});
EDIT:
You may also in your case need to override extractArray
as well: http://emberjs.com/api/data/classes/DS.RESTSerializer.html#method_extractArray