Interface for objects that can be serialized to a plain object. Useful for API responses, and data transfer.

Any class implementing this interface will be automatically converted to a plain object when passed through serialization systems.

Methods

toObject():Dynamic

Convert this instance to a plain object suitable for serialization. The returned object should only contain data that can be safely serialized to JSON (no functions, circular references, etc.).

Returns:

Dynamic object representation of this instance