Just because the internal data structures are JSON isn't a justification for the schema data itself to not be retrievable using other supported API formats.
If you wait for Gerrit change 182858 to be merged, you won't even have to worry about getting indexed tag names right for format=xml.
In fact, you simply need to remove the implemented getCustomPrinter method and test the change.
Test by finding a TemplateData with reasonably complex structure, making the change, and then fetching it using format=xml and format=php to see if the output looks sane.
The TemplateData extension information can be found on mediawiki.org. TemplateData itself implements only one Api action, so a part of this task is, that you find the code you need to change.