Interesting. Do you know what `Serializer` are you are using in your application? I've been using the `JSONSerializer` but (at a glance) this code looks like it is expecting with the `RESTSerializer`.