I want to serialize null List to empty array.
So given:
class MyBean { List values; }
And given an instance with null for values, it should be serialized to:
{ "values": [] }
I want this to be global behaviour for all Lists in all classes. I do not want to add any annotations or specific handling for classes.
I have read all related questions I found, and could not come up with anything that works. Seems any custom serializer I try to register for List class is not kicking in.
If you have this working on your project, let me know how did you manage to do that.