You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/05/07 11:26:21 UTC

[camel-kamelets] branch main updated: Value to Key updated to reflect the JsonNode as input

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new 6164a07  Value to Key updated to reflect the JsonNode as input
6164a07 is described below

commit 6164a07978e74d04d0da59eb8d36d57b6c5a23ce
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri May 7 13:25:52 2021 +0200

    Value to Key updated to reflect the JsonNode as input
---
 value-to-key-action.kamelet.yaml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/value-to-key-action.kamelet.yaml b/value-to-key-action.kamelet.yaml
index a246211..863c9db 100644
--- a/value-to-key-action.kamelet.yaml
+++ b/value-to-key-action.kamelet.yaml
@@ -31,13 +31,17 @@ spec:
           - simple: "${header[Content-Type]} == 'application/json'"
             steps:
             - unmarshal:
-                json: {}
+                json: 
+                  library: Jackson
+                  unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
       - set-property:
           name: "fields"
           constant: "{{fields}}"
       - bean: "org.apache.camel.kamelets.utils.transform.kafka.ValueToKey"
       - marshal:
-          json: {}
+          json: 
+            library: Jackson
+            unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
       - set-header:
           name: "Content-Type"
           constant: "application/json"