use = JsonTypeInfo.Id.MINIMAL_CLASS option will serialize minimal relative package path. For example, for supertype "com.logicbig.example.Shape", and concrete type "com.logicbig.example.shapes.Circle", only ".shapes.Circle" would be included; for "com.logicbig.example.shapes.impl.Rectangle" only ".shapes.impl.Rectangle" for "com.logicbig.example.Square" only ".Square" will be included.
I can not understand how the option understands that the minimum relative path of the package is exactly that? In the example about Shape, why, for example, not .example.shapes.Circle , namely .shapes.Circle ? Regarding what is the path chosen?