Integration Technologies - JDE1 (MOSC)

MOSC Banner

when outputs are converted to JSON, they are enclosed in quotes

edited May 5, 2022 4:58PM in Integration Technologies - JDE1 (MOSC) 1 commentAnswered
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 =

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center