when creating a string from a JSON object, it is constructing the resulting string like this
"comments": "[
{\"id\":2,
\"postType\":\"COMMENT_TYPE\",
\"subject\":\"RE: sadasds\",
\"body\":\"test comment submission\",
\"tags\":\"\",
\"media\":[],
\"comments\":\"[]\"}
]"
including the \" which makes it difficult for me to include in an existing JSON object
You’re going to have to explain the situation you’re in, and the code you’re using
I just tried this:
And it (as expected) gave me the output:
What version of Groovy are you using? Which JSON library are you using?