I have a mapping where I am trying to read serialized messages in Json format from Kafka topic in informatica PowerCenter and process to flat file. However, when I run the workflow, it reads messages which I can see in monitor and could not write to flat file it shows 0 records on targets and workflow succeeded. Below is the mapping.

code:
On input row:
O_key=convertBinaryToString(key); O_data=convertBinaryToString(data);
helper code:
public static byte[] buffer = new byte[7000];
public String convertBinaryToString(byte[] data){
try{
buffer = data;
String tempstr = new String(buffer);
logInfo(" Val of tempstr " + tempstr);
int strlen = tempstr.length();
String outstr = tempstr.trim();
logInfo(" Val of string len " + strlen);
logInfo(" O_key " + O_key);
return outstr;
}
catch (Exception ex) {logInfo("Caught exception .. " + ex);}
return "";
}
Does this code convert the serialized data into Json and Informatica able to read?