Skip to main content

SerializationConfig

This class defines the configuration settings for data serialization, specifically controlling how temporal types, byte sequences, and special floating-point values like infinity and NaN are handled. It serves as a central specification for determining the format and behavior of the serialization process across different data types.

Attributes

AttributeTypeDescription
temporal_modeTemporalModeDetermines the strategy used for serializing date, time, and datetime objects into target formats.
bytes_modeBytesModeSpecifies the encoding format, such as base64 or hex, used when converting raw byte sequences to strings.
inf_nan_modeInfNanModeDefines how non-finite floating-point values like Infinity and NaN are represented in the serialized output.

Constructor

Signature

def SerializationConfig(
temporal_mode: TemporalMode,
bytes_mode: BytesMode,
inf_nan_mode: InfNanMode
) - > null

Parameters

NameTypeDescription
temporal_modeTemporalModeThe mode to use for temporal data serialization.
bytes_modeBytesModeThe mode to use for bytes data serialization.
inf_nan_modeInfNanModeThe mode to use for infinity and NaN value serialization.

Signature

def SerializationConfig(
temporal_mode: TemporalMode,
bytes_mode: BytesMode,
inf_nan_mode: InfNanMode
) - > null

Parameters

NameTypeDescription
temporal_modeTemporalModeThe strategy used for serializing date and time objects, such as ISO strings or timestamps.
bytes_modeBytesModeThe encoding format used for binary data, typically determining if bytes are represented as base64 or hex strings.
inf_nan_modeInfNanModeThe representation style for Infinity and NaN values to ensure compatibility with the target serialization format.