util.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:qzig 作者: Seluxit 项目源码 文件源码
def default(self, obj):
        if type(obj) is value.ValuePermission:
            return obj.value
        if type(obj) is value.ValueStatus:
            return obj.value
        if type(obj) is state.StateType:
            return obj.value
        if type(obj) is state.StateStatus:
            return obj.value
        if type(obj) is value.ValueNumberType:
            return obj.__dict__
        if type(obj) is value.ValueStringType:
            return obj.__dict__
        if type(obj) is status.StatusType:
            return obj.value
        if type(obj) is status.StatusLevel:
            return obj.value
        # if type(obj) is value.ValueSetType:
        #    return obj.__dict__
        # if type(obj) is value.ValueBlobType:
        #    return obj.__dict__
        # if type(obj) is value.ValueXmlType:
        #    return obj.__dict__
        # return json.JSONEncoder.default(self, obj)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号