deeppavlov/agents/rich_content/default_rich_content.py
def json(self) -> dict:
        """Returns json compatible state of the ButtonsFrame instance.

        Returns json compatible state of the ButtonsFrame instance including
        all nested buttons.

        Returns:
            control_json: Json representation of ButtonsFrame state.
        """
        content = {}

        if self.text:
            content['text'] = self.text

        content['controls'] = [control.json() for control in self.content]

        self.control_json['content'] = content

        return self.control_json
def json(self) -> dict:
        content = {}

        if self.text:
            content['text'] = self.text

        content['controls'] = [control.json() for control in self.content]

        self.control_json['content'] = content

        return self.control_json
def json ( self ) -> dict : content = { } if self . text : content [ 'text' ] = self . text content [ 'controls' ] = [ control . json ( ) for control in self . content ] self . control_json [ 'content' ] = content return self . control_json
Returns json compatible state of the ButtonsFrame instance.

        Returns json compatible state of the ButtonsFrame instance including
        all nested buttons.

        Returns:
            control_json: Json representation of ButtonsFrame state.
Returns json compatible state of the ButtonsFrame instance .