#86: Support "clean" JSON output. What this means is that when we convert XML to JSON, we don't blindly array-ify every JSON property that gets converted. This makes it much more intuitive from a consumer standpoint as they no longer have to access every property as an array. We keep a list of known XML element paths that should always be converted as an array. This list is manually compiled from all the known XML schema files used by MapGuide.

This conversion is done at the PHP level as the mapagent handler we normally tap into will always array-ify its JSON properties. As a result, to support "clean" JSON output throughout the entire application, we intercept any attempts to invoke the mapagent handler with FORMAT=application/json, when we encounter such requests, we intercept and replace with FORMAT=text/xml so the XML result we get back can be converted through our "clean" JSON converter.