Yaml Special Token Cause Error To Pyyaml

PyYAML
YAML
Special Token
Errors
Conversion
Documentation
The YAML special token ‘!’ can cause errors in PyYaml. To avoid these issues, it is recommended to convert the token to ‘!!str’ and revert the change when writing back. For more information, consult the full documentation available at pyyaml.org/wiki/PyYAMLDocumentation.
Published

September 2, 2022


special token like !<str> need to be converted to !!str, while writing back we just do it in reverse.

full reference of pyyaml is here