MessagePartGatherSerializer
This class provides a specialized serialization mechanism for aggregating pre-serialized Message objects. It joins a list of serialized message strings into a single JSON-formatted array and encodes the resulting string using the latin-1 character set.
Methods
dumps()
@classmethod
def dumps(
obj: list[str]
) - > bytes
The parameter is an already serialized list of Message objects. No need to serialize it again, only join the list together and encode it.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | list[str] | A list of strings where each string is a pre-serialized Message object to be aggregated |
Returns
| Type | Description |
|---|---|
bytes | A latin-1 encoded byte string representing a JSON array of the serialized message objects |