I have created rest services using Spring MVC framework & in back end am using hibernate objects to fetch the data from the DB. I am directly exposing the hibernate objects through the rest service response as it is. But now i want to filter/dont want to show, some of the fields from the domain object in the rest service response. I want to know possible & performance effective solution for this. I have tried, JsonView, JsonFilter, @JsonIngore & created a POJO which will be populated from hibernate object & then will be shown in json response. Is there any other way? and are there any drawback of using JsonFilter? BTW i have implemented all these solutions in spring rest controller class (except the @jsonIgnore, I have added this annotation in hibernate object)
Are there any drawback of using jackson objectMapper class?
thanks in advance