I have a java class that implements Serializable interface. It has String, BigDecimal and other java predefined types which are serializable. It also includes a custom defined class that doesn’t implement Serializable. The custom type is also getting serialized into JSON.
But there are warnings showing either make it transient or make the custom type implement serializable.
How is the type getting serialized even though it doesn’t implement Serializable ? And Should I ignore the warnings ( SonarLint messages) ?