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
Post a Comment