def default(self, obj):
    encoded = None
    for encoder in self.encoders:
        if isinstance(obj, encoder.target):
            encoded = encoder.encode(obj)
            break
    if (encoded is None):
        encoded = super().default(obj)
    return encoded
def default(self, obj):
    encoded = None
    for encoder in self.encoders:
        if isinstance(obj, encoder.target):
            encoded = encoder.encode(obj)
            break
    if (encoded is None):
        encoded = super().default(obj)
    return encoded