Skip to main content

PythonSerializer

No overview available.

Attributes

AttributeTypeDescription
writerWThe output destination where the serialized Python data is written.
formatterF = CompactFormatterThe formatting logic used to control the visual representation and spacing of the serialized output.

Constructor

Signature

def PythonSerializer(
writer: W,
formatter: F = CompactFormatter
) - > [PythonSerializer](pythonserializer.md?sid=serializers_ser_pythonserializer)

Parameters

NameTypeDescription
writerWThe output destination for the serialized data.
formatterF = CompactFormatterThe formatting strategy used for the serialization process.

Signature

@staticmethod
def new(
writer: W
) - > PythonSerializer< W, CompactFormatter >

Parameters

NameTypeDescription
writerWThe output destination where the serialized Python data will be written

Signature

@staticmethod
def with_formatter(
writer: W,
formatter: F
) - > PythonSerializer< W, F >

Parameters

NameTypeDescription
writerWThe output destination for the serialized data
formatterFThe formatting implementation used to style the Python output (e.g., PrettyFormatter)