lets pass strings straight through if they are not JSON as we may have parsed a Reader or InputStream so don't wanna lose the payload for non JSON payloads
@@ -112,14 +112,13 @@ public class JsonEndpoint extends DefaultEndpoint {
if (text != null) {
if (isJsonLookingString(text.trim())) {
in.setHeader(Exchange.CONTENT_TYPE, JSON_CONTENT_TYPE);
+ }
in.setBody(text);
return;
}
- }
} catch (Exception e) {
// ignore
}
-
}
in.setHeader(Exchange.CONTENT_TYPE, JSON_CONTENT_TYPE);
