lburgazzoli opened a new issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652


   I have the following route that mimics what the _json-serialize-action_ 
action is expected to do:
   
   ```yaml
   - from:
       uri: "kamelet:timer-source"
       parameters:
         period: "1s"
         message: '{ "msg": "Hello Json" }'
       steps:
       - marshal:
           json: 
             library: Jackson
             unmarshalType: "com.fasterxml.jackson.databind.JsonNode"
       - set-header:
           name: "Content-Type"
           constant: "application/json"
       - to: "log:info?showAll=true&multiline=true"    
   ```
   
   But when running it, the type of the body is `byte[]`instead of _JsonNode_:
   
   ```
   2021-12-22 10:33:18.849  INFO 47060 --- [           main] 
o.a.c.m.BaseMainSupport                  : Auto-configuration summary
   2021-12-22 10:33:18.853  INFO 47060 --- [           main] 
o.a.c.m.BaseMainSupport                  :     camel.main.name=CamelJBang
   2021-12-22 10:33:18.853  INFO 47060 --- [           main] 
o.a.c.m.BaseMainSupport                  :     camel.main.shutdownTimeout=5
   2021-12-22 10:33:18.853  INFO 47060 --- [           main] 
o.a.c.m.BaseMainSupport                  :     
camel.main.routesReloadEnabled=false
   2021-12-22 10:33:18.853  INFO 47060 --- [           main] 
o.a.c.m.BaseMainSupport                  :     
camel.main.routesIncludePattern=file:r.yaml
   2021-12-22 10:33:18.853  INFO 47060 --- [           main] 
o.a.c.m.BaseMainSupport                  :     
camel.component.kamelet.location=classpath:/kamelets,github:apache:camel-kamelets/kamelets
   2021-12-22 10:33:19.072  INFO 47060 --- [           main] 
o.a.c.i.e.AbstractCamelContext           : Routes startup (total:2 started:2)
   2021-12-22 10:33:19.073  INFO 47060 --- [           main] 
o.a.c.i.e.AbstractCamelContext           :     Started route1 
(kamelet://timer-source)
   2021-12-22 10:33:19.073  INFO 47060 --- [           main] 
o.a.c.i.e.AbstractCamelContext           :     Started timer-source-1 
(timer://tick)
   2021-12-22 10:33:19.073  INFO 47060 --- [           main] 
o.a.c.i.e.AbstractCamelContext           : Apache Camel 3.14.0 (CamelJBang) 
started in 192ms (build:30ms init:79ms start:83ms)
   2021-12-22 10:33:20.112  INFO 47060 --- [ - timer://tick] info               
                      : Exchange[
     Id: 1D192FDF3D9D993-0000000000000000
     ExchangePattern: InOnly
     Properties: {CamelTimerCounter=1, CamelTimerFiredTime=Wed Dec 22 10:33:20 
CET 2021, CamelTimerName=tick, CamelTimerPeriod=1000, 
CamelToEndpoint=log://info?multiline=true&showAll=true}
     Headers: {CamelMessageTimestamp=1640165600078, 
Content-Type=application/json, firedTime=Wed Dec 22 10:33:20 CET 2021}
     BodyType: byte[]
     Body: "{ \"msg\": \"Hello Json\" }"
   ]
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to