Currently parsing / munging JSON responses into correct types happens at when responses are converted to data frames, in R/parse.R. There are a few downsides to this:
- Parsing doesn't happen before objects (e.g.
Content, connect_user) are created, and we're moving towards centering those.
- Currently it requires that we maintain a list of
ptypes for everything in the API. This is a little bit of overhead. Perhaps it's necessary, but perhaps we don't need it.
We should consider if there's a better place for parsing to happen, and think about lighter-weight ways to do it that retain the consistency and utility of having stuff from the server parse as the correct type. Way that don't require that we maintain a list of prototypes for all Connect server types (which inevitably fall behind reality).
Some discussion here: #470 (comment)