camel-kafka-connector icon indicating copy to clipboard operation
camel-kafka-connector copied to clipboard

Convert Struct to Map in the core so it can be used by JsonConverter, AvroConverter .. etc

Open omarsmak opened this issue 4 years ago • 1 comments

There are components/connectors that need the message body to be in form of Map, for example Camel Stitch, Camel SQL .. etc. Hence if you have a JSON data message from Kafka, e.g:

{
    "name" : "joe doe",
    "id": 12
}

The SMT should be able to convert this to Map datatype. e.g:

map.get("name");
map.get("id");

omarsmak avatar Feb 22 '21 08:02 omarsmak

It is not necessary, the JsonConverter can do this, however we need to convert the Struct to map

omarsmak avatar Feb 23 '21 08:02 omarsmak