##### SUMMARY
While `ansible-config dump` is a very useful tool for determining the configuration used by Ansible at runtime, it does have a major flaw: its output is not machine parseable.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
ansible-config

##### ADDITIONAL INFORMATION
ansible-config should have an option to dump config in a machine parseable format like JSON or YAML, so it can be consumed by other tools.

docs = DocCLI._combine_plugin_doc(plugin, plugin_type, doc, plainexamples, returndocs, metadata)
            if not fail_on_errors:
                
                try:
                    json.dumps(docs, cls=AnsibleJSONEncoder)
                except Exception as e:  
                    plugin_docs[plugin] = {
                        'error': 'Cannot serialize documentation as JSON: %s' % to_native(e),
                    }
                    continue
            plugin_docs[plugin] = docs
        return plugin_docs
    def _get_roles_path(self):
        '''
         Add any 'roles' subdir in playbook dir to the roles search path.
         And as a last resort, add the playbook dir itself. Order being:
           - 'roles' subdir of playbook dir
           - DEFAULT_ROLES_PATH (default in cliargs)
           - playbook dir (basedir)
         NOTE: This matches logic in RoleDefinition._load_role_path() method.
        '''
        roles_path = context.CLIARGS['roles_path']
        if context.CLIARGS['basedir'] is not None:
            subdir = os.path.join(context.CLIARGS['basedir'], "roles")
            if os.path.isdir(subdir):
                roles_path = (subdir,) + roles_path
            roles_path = roles_path + (context.CLIARGS['basedir'],)
        return roles_path
    @staticmethod
    def _prep_loader(plugin_type):