How to avoid null values serialization in HashMap?

前端 未结 5 600
夕颜
夕颜 2021-01-04 06:19

I would like to serialize a HashMap as a string through the Jackson JSON processor. For example:

String strMap = getMapper().writeValueAsString(myHashMap);
r         


        
5条回答
提交回复
热议问题