Add support for JSON

In addition to the MySQL and XML code, it now lets the user generate
JSON code too.