java - how to serialize a pojo with jackson in 2 different ways? -


i have different rest endpoints returns different parts of same object. how can serialize same object in 2 different ways? need different dto or there simpler way?

you can create different views different rest endpoints.

see documentation here: http://wiki.fasterxml.com/jacksonjsonviews


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -