def builder = new groovy.json.JsonBuilder() class Student { String name } def studentlist = [new Student (name: "Joe"), new Student (name: "Mark"), new Student (name: "John")] builder studentlist, { Student student ->name student.name} println(builder)
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more