Regarding your question about “pretty printing” JSON.
I’m not sure what exactly you’re looking for, but theres for example a Firefox addon: https://addons.mozilla.org/en-US/firefox/addon/10869/. Also, Zend_Json from the Zend Framework has a Zend_Json::prettyPrint() method.