(self, path, **kwargs)
return None
Read file input into memory, returning deserialized objects

        :param path: Path of file to read
        :param **kwargs:
            * ignore (``list``): List of file patterns to ignore
Read file input into memory, returning deserialized objects
Read file input into memory returning deserialized objects
def read_file(self, path, **kwargs):
        """Read file input into memory, returning deserialized objects

        :param path: Path of file to read
        :param **kwargs:
            * ignore (``list``): List of file patterns to ignore
        """
        # TODO support JSON here
        # TODO sphinx way of reporting errors in logs?

        parser_command = ["godocjson"]

        _ignore = kwargs.get("ignore")
        if _ignore:
            parser_command.extend(["-e", "{0}".format("|".join(_ignore))])

        parser_command.append(path)

        try:
            parsed_data = json.loads(subprocess.check_output(parser_command))
            return parsed_data
        except IOError:
            LOGGER.warning(
                "Error reading file: {0}".format(path),
                type="autoapi",
                subtype="not_readable",
            )
        except TypeError:
            LOGGER.warning(
                "Error reading file: {0}".format(path),
                type="autoapi",
                subtype="not_readable",
            )
        return None
def read_file ( self , path , * * kwargs ) : # TODO support JSON here # TODO sphinx way of reporting errors in logs? parser_command = [ "godocjson" ] _ignore = kwargs . get ( "ignore" ) if _ignore : parser_command . extend ( [ "-e" , "{0}" . format ( "|" . join ( _ignore ) ) ] ) parser_command . append ( path ) try : parsed_data = json . loads ( subprocess . check_output ( parser_command ) ) return parsed_data except IOError : LOGGER . warning ( "Error reading file: {0}" . format ( path ) , type = "autoapi" , subtype = "not_readable" , ) except TypeError : LOGGER . warning ( "Error reading file: {0}" . format ( path ) , type = "autoapi" , subtype = "not_readable" , ) return None