pike
val listArray = Json.createArrayBuilder() listData.forEach { listArray.add(it.toJSON()) } add("targetGoals", listArray)