I have an object in spring in which i would like to hide fields while using @
responsebody and display the fields back when i want to return using @responseentity
.
I tried @jsonignore
on setter and @jsonproperty
on getter... it doesn't work...
I tried @jsonproperty(access=Read.only)
On fields i wanted to hide...it doesn't work...
I tried @jsonignoreproperties
... it doesn't work
Is there a way to do it...rather than creating 2 objects
Please help... thanks