Repository navigation
Releases
zuyaml 0.1.0
Version 0.1.0 as published on CRAN.
- CRAN publication: 2026-10-07
- Submitted: 2026-09-18 12:59:12 UTC
- Tarball built: 2026-09-18 12:59:06 UTC
Changes
First release. The API is complete and the package is well tested, but it is
not frozen: names, defaults and return types may still change. Pin the
version if you depend on it.
Features
-
yaml_parse()/yaml_parse_all()parse YAML 1.2 from a string or a raw
vector,yaml_emit()/yaml_emit_all()convert R objects back to YAML, and
yaml_read()/yaml_read_all()/yaml_write()/yaml_write_all()do the
same for files. Throughout,_allmeans a YAML stream: several documents
separated by---, which is a different thing from a sequence. -
Scalars follow the YAML 1.2 core schema, so
yesandnoare strings and
dates are not coerced. Quoted scalars are always strings, and a quoted empty
string never becomesNULL. -
Integers beyond 2^53 are preserved as
zuyaml_bigintrather than silently
rounded.big_integersselects a different policy. -
Tags override schema resolution, so
!!str 12is the string"12", in every
spelling a core tag has: the shorthand, the verbatim form, and a handle bound
by a%TAGdirective. Application tags such as!durationare ignored by
default;tags = "error"refuses them. -
Mappings whose keys are sequences or mappings become
zuyaml_maprather than
having their structure flattened into names. This is parse-only. -
Errors are classed conditions carrying a stable
code,lineandcolumn,
so callers never have to match on message text. -
max_size,max_depthandmax_nodesbound untrusted input. The last of
these is what stops alias-expansion bombs, which are small and shallow by
construction and so escape the first two. -
A value emitted with
yaml_emit()parses back to the same value. Strings
containing a line break, and strings with leading or trailing whitespace, are
quoted so that neither is lost; a double with an integral value emits as
1.0, so it does not come back as an integer; and mapping keys are treated
exactly like values. Asserted over the whole yaml-test-suite and over
generated input. The exceptions are listed invignette("zuyaml"). -
A literal NUL byte in the input is refused with an
embedded_nulcondition
and a position. The underlying library treats one as end of input, so the
rest of the document -- including any later documents in the stream -- would
otherwise be discarded without a word. -
A UTF-8 byte order mark at the start of a stream is not part of the document.
-
A float outside the range of a double converts to the nearest one:
1e309is
Inf,1e-324is0, and1e-323is the subnormal it names. One extreme
value never changes the R type of a field.
Notes
-
simplifydefaults toFALSE: the shape of the result never depends on the
contents of the document. -
The
cyamlC library is bundled and pinned to v0.1.3. Seeinst/COPYRIGHTS
for licensing and the modifications made for R compatibility, and
tools/patches/README.mdfor why each one is required.
This tag was added retrospectively. It marks the commit named in CRAN-SUBMISSION for the accepted submission. The contents of zuyaml_0.1.0.tar.gz on CRAN were verified against this tree file by file, ignoring only the fields R CMD build and CRAN add to or drop from DESCRIPTION.