@classmethod
def _from_json(cls, root: JsonObject.__class__, data):
    if (root is None):
        return data
    for (key, type) in root._properties_by_attr.items():
        if (isinstance(type, (ListProperty,)) and (key in data)):
            data[key] = [cls._from_json(getattr(type.item_wrapper, 'item_type', None), item) for item in data[key]]
        elif (isinstance(type, (DictProperty,)) and (key in data)):
            data[key] = {in_key: cls._from_json(getattr(type.item_wrapper, 'item_type', None), value) for (in_key, value) in data[key].items()}
        elif (isinstance(type, (ObjectProperty,)) and (key in data)):
            data[key] = cls._from_json(type.item_type, data[key])
    if ('self' in data):
        data['_self'] = data['self']
        del data['self']
    return root(**data)
@classmethod
def _from_json(cls, root: JsonObject.__class__, data):
    if (root is None):
        return data
    for (key, type) in root._properties_by_attr.items():
        if (isinstance(type, (ListProperty,)) and (key in data)):
            data[key] = [cls._from_json(getattr(type.item_wrapper, 'item_type', None), item) for item in data[key]]
        elif (isinstance(type, (DictProperty,)) and (key in data)):
            data[key] = {in_key: cls._from_json(getattr(type.item_wrapper, 'item_type', None), value) for (in_key, value) in data[key].items()}
        elif (isinstance(type, (ObjectProperty,)) and (key in data)):
            data[key] = cls._from_json(type.item_type, data[key])
    if ('self' in data):
        data['_self'] = data['self']
        del data['self']
    return root(**data)