You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/11/16 10:53:45 UTC
[GitHub] [camel-k] squakez commented on issue #1915: not able to use json: MethodNotFoundException
squakez commented on issue #1915:
URL: https://github.com/apache/camel-k/issues/1915#issuecomment-970151837
Fixed jackson json in `1.7`. Tested with:
```
// camel-k: language=java dependency=camel-jackson
import org.apache.camel.builder.RouteBuilder;
public class Route extends RouteBuilder {
@Override
public void configure() throws Exception {
this.getContext().getGlobalOptions().put("CamelJacksonEnableTypeConverter", "true");
from("platform-http:/hello?httpMethodRestrict=GET").
setBody(simple("{\"hello\": \"world\"}"))
.unmarshal().json()
.log(" ${body.get('hello')}");
}
}
...
[1] 2021-11-16 10:51:36,173 INFO [io.quarkus] (main) camel-k-integration 1.7.0 on JVM (powered by Quarkus 2.4.0.Final) started in 5.172s. Listening on: http://0.0.0.0:8080
[1] 2021-11-16 10:51:36,173 INFO [io.quarkus] (main) Profile prod activated.
[1] 2021-11-16 10:51:36,174 INFO [io.quarkus] (main) Installed features: [camel-attachments, camel-bean, camel-core, camel-jackson, camel-java-joor-dsl, camel-k-core, camel-k-runtime, camel-platform-http, cdi, smallrye-context-propagation, vertx]
[1] 2021-11-16 10:51:54,123 INFO [route1] (executor-thread-0) world
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org