Return to index

yaml functions

any = yaml_delete(data, path)

top

Delete value from YAML data using dot notation path. Returns modified data.

Example:

# Example for yaml_delete
data = yaml_parse("a: 1\nb: 2")
println yaml_delete(data, "a")


any = yaml_get(data, path)

top

Get value from YAML data using dot notation path (e.g., 'spec.containers[0].image').

Example:

# Example for yaml_get
data = yaml_parse("a: 1\nb: 2")
println yaml_get(data, "a")


string = yaml_marshal(data)

top

Convert Za data to YAML string.

Example:

# Example for yaml_marshal
println yaml_marshal(42)


any = yaml_parse(yaml_string)

top

Parse YAML string to Za data structures.

Example:

# Example for yaml_parse
yaml = "name: Alice\nage: 30\nhobbies:\n  - reading\n  - hiking"
println yaml_parse(yaml)


any = yaml_set(data, path, value)

top

Set value in YAML data using dot notation path. Returns modified data.

Example:

# Example for yaml_set
data = yaml_parse("a: 1")
println yaml_set(data, "b", 2)