I have a POJO class with certain properties.
I want a property to be hidden when its returned as JSON via REST api(Spring Boot).
But it should be available when I used ObjectMapper's writeValueAsBytes/readValue method.
How can I do this?
Pojo object = objectMapper.readValue(stream,Pojo.class);//should be available
objectMapper.writeValueAsBytes(pojoObject)//should write that property too