@yaml.bzl//:yaml.bzl
Public API for yaml.bzl.
Functions & Macros
yaml.aliasParameters
*name |
yaml.anchorParameters
*name | |
*value |
yaml.dumpSerialize a Starlark value as a YAML document string.
Parameters
*value | Mapping, sequence, or scalar to emit. |
indent | Base indentation level (spaces). Default: 0 |
indent_str | String repeated per indent level for nested block content. Default: " " |
explicit_start | If true, prefix the document with "---". Default: False |
explicit_end | If true, suffix the document with "...". Default: False |
sort_keys | If true, emit mapping keys in a stable sorted order. Default: False |
flow_style | If true, emit JSON-style flow collections instead of block style. Default: False |
yaml_version | Optional "%YAML" directive value (must be "1.2" if set). Default: None |
tag_directives | Optional "%TAG" handles for dump output. Default: None |
yaml.dump_allSerialize a list of values as a multi-document YAML stream.
Parameters
*values | List of document roots to emit in order. |
indent | Base indentation level (spaces). Default: 0 |
indent_str | String repeated per indent level for nested block content. Default: " " |
explicit_start | If true, each document starts with "---" (default true). Default: True |
explicit_end | If true, each document ends with "..."; may be forced for streams with directives. Default: False |
sort_keys | If true, emit mapping keys in a stable sorted order. Default: False |
flow_style | If true, emit JSON-style flow collections instead of block style. Default: False |
yaml_version | Optional "%YAML" directive value per document (must be "1.2" if set). Default: None |
tag_directives | Optional "%TAG" handles applied to each document. Default: None |
yaml.get_errorsParameters
*document |
yaml.get_valueParameters
*document |
yaml.has_errorsParameters
*document |
yaml.is_documentParameters
*node |
yaml.is_mappingParameters
*value |
yaml.is_scalarParameters
*value |
yaml.is_sequenceParameters
*value |
yaml.parseParameters
*yaml_string | |
strict | Default: False |
yaml.parse_allParse a YAML character stream into a list of document nodes.
Parameters
*yaml_string | Full stream text (may contain multiple documents). |
strict | If true, fail when any document records parse errors. Default: False |
yaml.tagParameters
*tag | |
*value |
yaml.validate_dump_directivesCheck dump()/dump_all() directive arguments before emitting YAML.
Parameters
*yaml_version | Optional version string; if set must be "1.2". |
*tag_directives | None, a dict of handle to prefix, or a list of [handle, prefix] pairs. |