Merge pull request #846 from charithag/master

Fixed issue in HTTPEventAdapter with inner json objects
This commit is contained in:
Rasika Perera 2017-11-17 15:55:55 +05:30 committed by GitHub
commit ef79e7fcc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,6 +186,8 @@ public class HTTPEventAdapter implements OutputEventAdapter {
String payload = message.toString();
if ("true".equals(dynamicProperties.get(HTTPEventAdapterConstants.ADAPTER_MESSAGE_URL_TEMPLATED))) {
contentType = "application/json";
payload = payload.replace("'", "\\\"");
try {
JSONParser jsonParser = new JSONParser();
JSONObject jsonPayload = (JSONObject) jsonParser.parse(payload);