When using an empty JSON {} as the JSON Sample, the REST Adapter is sending any mapped JSON payloads within quotes and with escape characters.
(Doc ID 2896493.1)
Last updated on SEPTEMBER 28, 2022
Applies to:
Oracle Integration-OIC - Version 21.2.2.0.0 and laterInformation in this document applies to any platform.
Symptoms
A requirement might be for an integration to be able to send an arbitrary JSON payload to an endpoint.
Because the empty JSON {} can be used to map any JSON payload, it might be supposed that by providing the empty JSON as the JSON Sample to an Adapter, that this could be used as a solution.
But when using an empty JSON {} as the JSON Sample, the Adapter is sending mapped JSON payloads within quotes and with escape characters.
Example steps :
1. Supply an empty JSON {} as the sample JSON for a REST Adapter invoke (or any Adapter invoke, eg. a File Adapter invoke).
2. In the OIC Mapper, map any JSON String to the request-wrapper of that invoke, eg :-
{"SimpleTest":"test"}
3. Observe the wire message sent by the Adapter (or review the payload received by the endpoint being invoked). It is escaped and quoted. eg :
"{\"SimpleTest\":\"test\"}"
These quotes and escape characters may cause issues on the endpoint side, so how can this use-case otherwise be achieved ?
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |