When an object has a field of a custom class (for example, a field SimplePojo myPojo = null) it throws exception when trying to get the type (object class name):
Uncaught TypeError: Cannot read properties of undefined (reading 'typeMarker_0_g$')
at Jyj_g$ (Util.java:38)
at $vj_g$ (Cast.java:378)
at o_g$ (Object.java:71)
at ZTk_g$ (Serializer.java:36)
at lUk_g$.aUk_g$ [as serializeToJson_0_g$] (Serializer.java:50)
at ZVk_g$.bWk_g$ [as serializeToJson_0_g$] (Serializer_TypeSerializer.java:1714)
at ZVk_g$.aWk_g$ [as serialize_3_g$] (Serializer_TypeSerializer.java:1694)
Serializing a complex java bean should allow null fields of objects that are not primitives of default java classes (like String).
Is there a solution/workaround for this?
PS. If there is a null list of objects (for example a field ArrayList myList), the serialization works fine.