On Fri, Jan 18, 2019 at 2:13 AM Marcos Passos <marcospassos....@gmail.com> wrote:
> How would you fix this example, then? Perhaps we should add more examples >> in the docs. >> > > But it closes for extension preventing the serialization of instances not > whitelisted. It may work for @internal or package private classes, but not > for public classes. > That is precisely what this is designed for. A subclass is a different type, with a world of possible broken things in it: do not consider the subclass to be the same as a parent class: it's a logical mistake. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/