def __init__(self, json=None, dict=None):
    super(DictBasedObject, self).__init__()
    object.__setattr__(self, '_content', {})
    object.__setattr__(self, '_allowedKeys', (set(self._structure.keys()) | set(self._possible_keys)))
    for key in self._structure:
        if (self._structure[key][2] is not None):
            setattr(self, key, self._structure[key][2])
    if json:
        self.loadJSON(json)
    elif dict:
        self.loadDict(dict)
def __init__(self, json=None, dict=None):
    super(DictBasedObject, self).__init__()
    object.__setattr__(self, '_content', {})
    object.__setattr__(self, '_allowedKeys', (set(self._structure.keys()) | set(self._possible_keys)))
    for key in self._structure:
        if (self._structure[key][2] is not None):
            setattr(self, key, self._structure[key][2])
    if json:
        self.loadJSON(json)
    elif dict:
        self.loadDict(dict)