SyntaxFix
Write A Post
Hire A Developer
Questions
Use Gson library to convert ArrayList to JsonArray.
Gson gson = new GsonBuilder().create(); JsonArray myCustomArray = gson.toJsonTree(myCustomList).getAsJsonArray();