when outputs are converted to JSON, they are enclosed in quotes
I am working in Orchestator Versión Studio: 6.1.4.0, I am coding a Grovy service request, when outputs are converted to JSON, they are enclosed in quotation marks, which means that the internal parameters have a backslah and and quotation marks.
When I test directly service request test button output, is good
[json:{"name":"John Doe","age":42}]
but Orchestrator Client or SoapUI looks like this
{
"ServiceRequest1" : {
"rows" : "{\"name\":\"John Doe\",\"age\":42}"
}
}
other orchestrator versions dont show this error
CODE
import groovy.transform.CompileStatic;
import com.oracle.e1.common.OrchestrationAttributes;
import java.text.SimpleDateFormat;
import groovy.json.JsonOutput;
@ CompileStatic
HashMap < String, Object > main(OrchestrationAttributes orchAttr, HashMap inputMap) {
orchAttr.writeWarn("START DB Groovy");
HashMap <String,Object> returnMap = new HashMap <String,Object> ();
try {
def jsonArray = 0