def to_json(self, buffer_or_path=None, indent=2):
        """
        Parameters
        ----------
        buffer_or_path: buffer or path, default None
            output to write into. If None, will return a json string.
        indent: int, default 2
            Defines the indentation of the json

        Returns
        -------
        None, or a json string (if buffer_or_path is None).
        """
        # return json
        return json_data_to_json(
            self.to_json_data(),
            buffer_or_path=buffer_or_path,
            indent=indent
        )
def to_json(self, buffer_or_path=None, indent=2):
        """
        Parameters
        ----------
        buffer_or_path: buffer or path, default None
            output to write into. If None, will return a json string.
        indent: int, default 2
            Defines the indentation of the json

        Returns
        -------
        None, or a json string (if buffer_or_path is None).
        """
        # return json
        return json_data_to_json(
            self.to_json_data(),
            buffer_or_path=buffer_or_path,
            indent=indent
        )
def to_json ( self , buffer_or_path = None , indent = 2 ) : # return json return json_data_to_json ( self . to_json_data ( ) , buffer_or_path = buffer_or_path , indent = indent )
Parameters
        ----------
        buffer_or_path: buffer or path, default None
            output to write into. If None, will return a json string.
        indent: int, default 2
            Defines the indentation of the json

        Returns
        -------
        None, or a json string (if buffer_or_path is None).
Parameters ---------- buffer_or_path : buffer or path default None output to write into . If None will return a json string . indent : int default 2 Defines the indentation of the json