coderly/ember-gdrive — pull request #28 by begedin (2014-12-29 13:40:02+00:00)
Title: Improved solution for read-only gapi object properties

This will hopefully resolve, or at least bring us closer to the resolution of #27

While looking into #21, I had to dig a bit deeper into ember-data.

It turns out there's a `normalizePayload` method inside the JSON serializer (which we are using in a slightly modified form). The method looks like this:
```
normalizePayload: function(payload) {
return payload;
}
```

Basically, this is THE centralized spot where we can deal with the object we got back from gapi having read-only properties.

For now, I've moved the hack there, but I'm still having difficulties finding a proper solution for it.

Digging through the real-time api documentation, the only properties that are listed as read-only are `CollaborativeObject` (string, list, map, etc.) ids. It may be that this is the only thing that's giving us trouble, but it's very difficult to figure out if a property is read-only through the browser debugger. Attempting to change the value of any property during debugging works just fine, even though the property acts as read-only in normal code execution.

I'm looking into some methods to figure this out.

However, both for this issue and #21, it looks might be we will need a much more robust and complete serializer of our own. I'm not far enough into it to be sure, though.