On Wed, Jul 18, 2018 at 8:10 AM, Idan Shay <idan1...@gmail.com> wrote: > Hi, > > I have class that I want to convert to JSON. > > Some of the fields I dont want to be convert to JSON and I am able to do > this by add access mode WRITE_ONLY. > > The problem that I have is with one field that in some case need to be > serialize to JSON and in other case not. > > How can I change the access mode at run time ? > Or there is other way ?
I think what you are trying to do may be easiest done by using JSON Views. I wrote this blog post years ago but it might be helpful: http://www.cowtowncoder.com/blog/archives/2011/02/entry_443.html -+ Tatu +- -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To post to this group, send email to jackson-user@googlegroups.com. For more options, visit https://groups.google.com/d/optout.