in src/main/java/com/epam/eco/commons/kafka/serde/JsonStringDeserializer.java [38:54]
public String deserialize(String topic, byte[] data) {
if (data == null) {
return null;
}
try {
Object jsonObject = ObjectMapperSingleton.INSTANCE.
readValue(new String(data, StandardCharsets.UTF_8), Object.class);
if (pretty) {
return ObjectMapperSingleton.INSTANCE.
writerWithDefaultPrettyPrinter().writeValueAsString(jsonObject);
}
return ObjectMapperSingleton.INSTANCE.writeValueAsString(jsonObject);
} catch (IOException ioe) {
throw new RuntimeException("Failed to deserialize JSON string", ioe);
}
}