Convert JSON to String Oracle Integration by Ankur Jain
October 28, 2021 Leave a comment
I have seen multiple target applications which accept the JSON data as a String in a single element. So, it is necessary to convert the JSON to String before you call the target endpoint.
Convert JSON to String Oracle Integration
For example:
Below is the JSON which you may get from the source system:
{
"firstname": "ankur",
"lastname": "jain"
}
and you need to map the above JSON as a string in the following single element:
{
"data" : "{\n \"firstname\" : \"ankur\",\n \"lastname\" : \"jain\"\n}"
}
So, in order to achieve this, first, you have to write the JSON to the temporary location using the Stage File action and read it using the opaque schema as a String.
Here is the opaque.xsd code which you need to use to read the JSON from the stage: Read the complete article here.
For regular information on Oracle PaaS become a member in the PaaS (Integration & Process) Partner Community please register here.
Blog
Twitter
LinkedIn
Facebook
Wiki
Technorati Tags: SOA Community,Oracle SOA,Oracle BPM,OPN,Jürgen Kress