Need to create Json like this
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
Would you please check this script
You may test it online in the above link.
import static groovy.json.JsonOutput.toJson import static groovy.json.JsonOutput.prettyPrint def data = [data1: "data1", data2: "data2"] def jsonString = prettyPrint(toJson(data: data).toString()) log.info jsonString
Some time members float the thread with messages. And do not reply once the solution is posted. There could be multiple reasons for being delayed in reply. But, it would be encouraging if reply is prompt on the solutions or providing with feedback.
This message is not just specific to this case, it is the case in general. I do notice that it happens even the members are online, no reply after the solution recieved.
Thank you for taking a look.
@nmrao , I agree. I would be happy if this helps find a solution faster.
Some users looking for information in the existing topics prefer going through only those topics that are marked as solved. So, this can increase the chances for them to find useful information.
I hope to see this topic solved soon