Default Serialization Functions

SQLAthanor applies default serialization functions to pre-process your model attributes before serializing them. These default functions primarily exist to convert a SQLAlchemy Data Type into a type appropriate for the format to which you are serializing your model instance.

The table below explains how a given model attribute data type is serialized using the default serialization function for each data type. If no information is provided, that means the value is serialized “as-is”.

Data Types CSV JSON YAML dict
None
Empty string ''
     
       
bool Boolean BOOLEAN        
       
       
ISO-8601 formatted
string
ISO-8601 formatted
string
ISO-8601 formatted
string
 
       
bytes string string string  
total number of seconds
total number of seconds
total number of seconds
 
  string    
       
oracle.BINARY_FLOAT
oracle.BINARY_DOUBLE
       
oracle.BFILE oracle.RAW   string string  
  string string string
UnsupportedSerializationError      
UnsupportedSerializationError list list  
UnsupportedSerializationError UnsupportedSerializationError UnsupportedSerializationError UnsupportedSerializationError