ts_serialize icon indicating copy to clipboard operation
ts_serialize copied to clipboard

[BUG] - Nested objects cannot be serialized if they are set to null

Open WillForrestMindBridge opened this issue 10 months ago • 0 comments

Describe the bug Any nested object that is also a class cannot be serialized if it is set to null. When set to undefined, it can serialize properly, but not with null.

Image

To Reproduce Steps to reproduce the behaviour:

  1. Create an class (A) with another class (B) as a field
  2. Create the class
  3. Set the field to null
  4. Attempt to use .tsSerialize() or JSON.stringify or toJSON()
  5. See error

Expected behaviour The primitive "null" is chosen as the serialization value.

Desktop (please complete the following information):

  • OS: MacOS, linux
  • Browser: FIrefox + chrome
  • Version 2.0.3

WillForrestMindBridge avatar Feb 26 '25 21:02 WillForrestMindBridge