replace string array with JSONArray for endpoints