zuyaml_map: Mappings whose keys are not scalars

zuyaml_mapR Documentation

Mappings whose keys are not scalars

Description

YAML mapping keys can be sequences or mappings, which cannot become R names without destroying structure. yaml_parse() represents such a mapping as a zuyaml_map: two parallel lists, keys and values.

Usage

## S3 method for class 'zuyaml_map'
print(x, ...)

Arguments

x

A zuyaml_map.

...

Ignored.

Details

This is parse-only. The vendored cyaml builder can only attach string keys, so a zuyaml_map cannot be emitted; see vignette("zuyaml") for the full list of conversions that do not round-trip.

Value

print() returns x invisibly.

Examples

yaml_parse("? [one, two]\n: value\n")

zuyaml documentation built on Oct. 7, 2026, 5:08 p.m.