0

I have a route

from(bla bla)
.process(exchange -> {
  //business logic
 })
.marshal().json(JsonLibrary.Jackson)
.to("http:......");

After marshaling I have some null values from the POJO object in the JSON file. I need to set nulls to empty strings in the JSON file. Is there any annotation, mapping or another way to set nulls to empty strings during marshaling?

  • You are using Jackson so essentially there is already plenty of answers. The one linked in the previous comment introduces several different ways. – user272735 Jul 21 '21 at 05:13

0 Answers0