What sort of data expects the default serializer to be returned?


Hi, i try to make my own implementation of an Adapter with socket.io. All work fine, except that the serializer tells me it’s can’t convert Undefined to Object. I think my json return is mal-formed.

My server returns this json when i try to get a list of foo objects :

javascript { “foo”: [{ “id”: 1, “rev”: 0, “title”: “some title”, “Description”: “some description” },{ “id”: 2, “rev”: 0, “title”: “another title”, “Description”: “another description” }] }

Any idea? thanks in advance


Hi @scandinave. I don’t see anything obviously wrong with that JSON. Could you post a stack trace of where you are getting the error?


I find the solution :

I change switch this line order : javascript that.get(‘io’).on(url, function(data) { return new Ember.RSVP.Promise(function(resolve, reject) {

to this : 

return new Ember.RSVP.Promise(function(resolve, reject) {
       that.get('io').on(url, function(data) {