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/12/22 09:35:42 UTC
[GitHub] [camel-kamelets] lburgazzoli opened a new issue #652: [json-serialize-action] does not work as intended
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kamelets] davsclaus commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999489317
yeah it should be unmarshal, when you want to jackson to bind data to POJOs
when you use marshal then it takes "whatever" and writes that as an output stream (eg byte[] etc)
--
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
[GitHub] [camel-kamelets] lburgazzoli commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999439621
would be nice, but I then don't know what to do with `json-deserialize-action.kamelet.yaml`
--
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
[GitHub] [camel-kamelets] lburgazzoli edited a comment on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999507083
given that we have workaround now by using the json-serialize/deserialize action and that we may need to discuss the correct behavior a little bit more, I think we can start a release vote for 0.6 and leave this open.
@oscerd @davsclaus what do you think ?
--
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
[GitHub] [camel-kamelets] lburgazzoli commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999507083
@oscerd @davsclaus given that we have workaround now by using the json-serialize/deserialize action and that we may need to discuss the correct behavior a little bit more, I think we can start a release vote for 0.6 and leave this open
--
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
[GitHub] [camel-kamelets] davsclaus commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999490757
2021-12-22 12:10:55.270 INFO 23227 --- [ - timer://tick] info : Exchange[
Id: 9056CFCD5C7172F-0000000000000003
ExchangePattern: InOnly
Properties: {CamelTimerCounter=4, CamelTimerFiredTime=Wed Dec 22 12:10:55 CET 2021, CamelTimerName=tick, CamelTimerPeriod=1000, CamelToEndpoint=log://info?multiline=true&showAll=true}
Headers: {CamelMessageTimestamp=1640171455267, Content-Type=application/json, firedTime=Wed Dec 22 12:10:55 CET 2021}
BodyType: com.fasterxml.jackson.databind.node.ObjectNode
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kamelets] oscerd commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999442426
@nicolaferraro can you please shed some light on the serialize/deserialize configuration?
--
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
[GitHub] [camel-kamelets] oscerd commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999437083
I think so. Do we need this sorted for cutting the release again?
--
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
[GitHub] [camel-kamelets] davsclaus commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999550710
okay
--
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
[GitHub] [camel-kamelets] lburgazzoli commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999430361
@oscerd @davsclaus what do you think ?
--
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
[GitHub] [camel-kamelets] lburgazzoli commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999430008
Should it be `unmarshal`instead of `marshal`?
--
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
[GitHub] [camel-kamelets] davsclaus commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999445689
Every time you use a data format / json etc then its like flipping a coin, if its marshal or unmarshal.
--
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
[GitHub] [camel-kamelets] oscerd commented on issue #652: [json-serialize-action] does not work as intended
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #652:
URL: https://github.com/apache/camel-kamelets/issues/652#issuecomment-999533856
+1 for releasing
--
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