I am writing a file type converter using Python and PyYAML for a project where I have repeatedly translated and from YAML files. These files are then used by a separate service that I do not control, so I need to translate YAML back in the same way as I do. My source file has the following sections:
key:
- value1
- value2
- value3
What is evaluated {key: [value1,value2,value3]}using yaml.load(). When I transfer this back to YAML, my new file reads as follows:
key: [value1,value2,value3]
My question is whether these two forms are equivalent in relation to the different parsers of the YAML file language. Obviously, using PyYaml is equivalent, but is this true for Ruby or other languages โโthat the application uses? Otherwise, the application will not be able to display the data correctly.