Is it supposed to be possible to transmit arbitrary nested data structures in the API? Or do the format serializers make some assumptions that limit what we can do?
I added a change yesterday which returns a complex parse tree via the API. It works fine in JSON format, but in XML (depending on how I do it) I either get empty elements, or I get Sanitizer warnings. I was using the addPageSubItem() method, inherited from ApiQueryBase.
Some more details are in this bug: https://bugzilla.wikimedia.org/show_bug.cgi?id=34058