# JSON Serialization Demo

eXist supports various serializers for writing out the results of an XQuery script. One of the most useful is the JSON serializer, which transforms the XML output of an XQuery into JSON.

This example embeds the jQuery dynatree widget to display the current database collection hierarchy as a tree. The tree is loaded via an AJAX call to the XQuery json.xql, which returns data in the JSON format as expected by the dynatree widget.

View source: HTML page, XQuery module.