Jackson - suppressing serialization(write) of properties dynamically

前端 未结 4 2124
难免孤独
难免孤独 2021-01-04 10:21

I am trying to convert java object to JSON object in Tomcat/jersey using Jackson. And want to suppress serialization(write) of certain properties dynamically.

I can

4条回答
  •  轮回少年
    2021-01-04 11:18

    Have you tried using JSON Views? Views allow annotation-based mechanism for defining different profiles, so if you just need slightly differing views for different users, this could work for you.

提交回复
热议问题