Removed usage of JSONObject.getNames method