Skip to main content

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

NameTypeDescription
objlistThe collection of message objects or parts to be serialized into JSON format.

Returns

TypeDescription
listA list of JSON-encoded strings, each representing an individual message part with minimized whitespace.