Extend API to retrieve plain JSON

That makes sense, and actually I think OData supports $expand=* to expand all tables. You can find some of the implementation for the OData endpoint in lib/data/json.js. That file parses the submission XML and formats the data values. I think the next step would probably be to see what changes would be needed to lib/data/json.js to support $expand. It might also be worth considering just adding support for $expand=* for the root table if that would be significantly easier than a more general implementation of $expand.

2 Likes