davsclaus commented on a change in pull request #5299:
URL: https://github.com/apache/camel/pull/5299#discussion_r608067380



##########
File path: 
components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
##########
@@ -182,14 +182,30 @@ private Object doRead(String path, Exchange exchange) 
throws IOException, CamelE
             return JsonPath.using(configuration).parse(list).read(path);
         } else {
             // can we find an adapter which can read the message body/header
-            Object answer = readWithAdapter(path, exchange);
+            Object answer = null;

Review comment:
       Your option is fine. The "problem with the adapter" is that not only 
introduced more recently with the switch to jackson as json library. The 
adapter was only something added to make it easier to switch to use jackson 
instead of that json-smart that it was using as default. But since jackson is 
now the default, then the adapter is not really to be used.
   
   Just add a note in the 3.10 upgrade guide in the docs about this potential 
change.
   
   And yes IMHO reading as InputStream first is the best choice - InputStream 
is used by many components.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to