I've been making use of JSON a lot lately since it's fast and convenient to make partial updates on your webpage. I wrote me some reusable flowscript to generate the necessary JSON data.
If you put this script inside your flow folder you can easily generate a JSON string.
A sample is listed below.
My relevant sitemap snippets:
jsonlibtest.jx looks like:
The result looks like