def __init__(self, jdata={}): GenericDoc.__init__(self) for k, v in jdata.items(): if v is None: v = {} setattr(self, k, v)
def __init__(self, jdata={}): GenericDoc.__init__(self) for k, v in jdata.items(): if k == "frequency": continue if v is None: v = {} setattr(self, k, v) if jdata.get("frequency") is not None: for ip, count in jdata.get("frequency"): self.frequency.append( { "entry": { "ip": ip, "count": count } } )
def __init__(self, jdata={}): GenericDoc.__init__(self) self.results = jdata.get("results")
def __init__(self, jdata={}): GenericDoc.__init__(self, jdata) for k, v in jdata.items(): setattr(self, k, v)