How to convert the Javan Object in Scenario to JSON Objects #5528
Replies: 3 comments
-
Can you provide the input message schema, output message schema and the spel expression extracting this inner object? |
Beta Was this translation helpful? Give feedback.
-
Yes, you are correct. We are passing the Record into string type filed of Kafaka payload as well as we are trying to build a JSON string by including the record. |
Beta Was this translation helpful? Give feedback.
-
Nussknacker do this automatically if the target type is also a record. It handles conversion between arvo records and json records and vice versa. But we don't have any mechanism allowing to convert a record to the json string. Probably it would be a good option to have such a feature in helpers - we already have a |
Beta Was this translation helpful? Give feedback.
-
We are trying to use Nussknacker for building complete Scenario's, our requirement is to publish the inner object of a input kafka message to output kafka.
The problem is, once I fetch the inner object using SPEL it is in Java format (with =), and if I pass that into Kafka it is not transformed as JSON instead it is going as Java object and getting error because of not able to pares.
Beta Was this translation helpful? Give feedback.
All reactions