相关疑难解决方法(0)

Python可序列化对象json

class gpagelet:
    """
    Holds   1) the pagelet xpath, which is a string
            2) the list of pagelet shingles, list
    """
    def __init__(self, parent):
        if not isinstance( parent, gwebpage):
            raise Exception("Parent must be an instance of gwebpage")
        self.parent = parent    # This must be a gwebpage instance
        self.xpath = None       # String
        self.visibleShingles = [] # list of tuples
        self.invisibleShingles = [] # list of tuples
        self.urls = [] # list of string

class gwebpage:
    """
    Holds all the datastructure after …
Run Code Online (Sandbox Code Playgroud)

python json serializable

30
推荐指数
3
解决办法
5万
查看次数

标签 统计

json ×1

python ×1

serializable ×1