Converting List/Hash to JSON in Groovy

Viewed 24

I want to convert my following list that i receive to json, i find different solutions online to do that but failed, does anyone know how to do that

   result = [test:[mod:a, date:1-1-2022], test-1:[mod:d, date:1-1-2022], test-2:[mod:f, date:1-1-2022], test-3:[mod:i, date:1-1-2022], test-4:[mod:k, date:1-1-2022], test-5:[mod:l, date:1-1-2022]]
0 Answers
Related