Ask a Question

Create json in Groovy

SOLVED
henil_shah
Contributor

Create json in Groovy

Need to create Json like this

"data":

{

"data1":"data1",

"data2":"data2"

}

}

 

I'm able to create the below one but not the above one. I'm using def json = new JsonOutput().toJson(obj) for the below

{

"data1":"data1",

"data2":"data2"

}

10 REPLIES 10
Olga_T
SmartBear Alumni (Retired)

Sorry for the inconvenience, @henil_shah. I didn't mean to bother you. I'm just passionate about helping people and always try to find solutions where possible.
It’s great to hear the issue is solved.

Have a great day!

 


Olga Terentieva
SmartBear Assistant Community Manager

cancel
Showing results for 
Search instead for 
Did you mean: