def convert_obj_into_marshallable(self, obj):
    marshalable_types = (str, int, float, type(None), bool, complex, bytes, bytearray, tuple, set, frozenset, list, dict)
    if isinstance(obj, array.array):
        if (obj.typecode == 'c'):
            return obj.tostring()
        if (obj.typecode == 'u'):
            return obj.tounicode()
        return obj.tolist()
    if isinstance(obj, marshalable_types):
        return obj
    return self.class_to_dict(obj)
def convert_obj_into_marshallable(self, obj):
    marshalable_types = (str, int, float, type(None), bool, complex, bytes, bytearray, tuple, set, frozenset, list, dict)
    if isinstance(obj, array.array):
        if (obj.typecode == 'c'):
            return obj.tostring()
        if (obj.typecode == 'u'):
            return obj.tounicode()
        return obj.tolist()
    if isinstance(obj, marshalable_types):
        return obj
    return self.class_to_dict(obj)