MessagePartSerializer
This class provides functionality to serialize message objects into a list of JSON-formatted strings. It utilizes a specialized encoder to handle message-specific data types while ensuring compact output through custom separators.
Methods
dumps()
@classmethod
def dumps(
obj: list
) - > list
Serializes a list of message objects into a list of JSON-formatted strings using a specialized MessageEncoder.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | list | The collection of message objects or parts to be serialized into JSON format. |
Returns
| Type | Description |
|---|---|
list | A list of JSON-encoded strings, each representing an individual message part with minimized whitespace. |