The Crystal Programming Language Forum

Modify contents of parsed yaml

After reading a yaml file by YAML.parse, I’d want to change some values in the YAML::Any data structure and write back the YAML file, but I can’t find the right syntax.
Does the current YAML API allows this ?

Kinda yes, Carcin.

However I would suggest looking into YAML::Serializable. Then you could do stuff like Carcin, which is a better API and more type safe.

Works fine, Thanks a lot.
(integer values need cast to i64 however)