Nesamani Raman wrote:Thanks for your kind reply, Rob.
I wanted to know if I have multiple patterns to be excluded, how to approach it?
Should I first combine all the exclusion patterns using "|" and then use or is there an efficient/simpler way? I am not sure if I my approach is correct. Please guide.
Nesamani Raman wrote:Hey Knute, many thanks for your reply.
@Rob, what are the other ways in which I can accomplish the exclusion of a pattern?
Claude Moore wrote:Technically you're right, you can serialize in Json a non-java-serializable class, for example with Gson or Jackson library.
Moreover, in Java you got serialization for (near) free, so that many times declaring an Object as Serializable is more an habit that a real need.
Arun Singh Raaj wrote:Thanks for replying.
Does @Transient annotation exclude the specific field while sending the JSON data? or it's specific to only Serialization? Does @Transient work in non-'Serializable' class?