Constructing the JSON via a String in Java and then creating an JSONArray from it is a little nasty.  I would prefer if we use the Java Objects and built the JSONArrays/JSONObjects.