Open
Description
I encountered an issue with preserving the single quote in output yaml file. Here is a simple example:
import yaml
random_condition = """
- type: value
key: some_id
value:
- '04549'
- '24543'
"""
names = yaml.safe_load(random_condition)
with open('names.yml', 'w') as file:
yaml.safe_dump(names, file)
print(open('names.yml').read())
The output yaml will display the following:
value:
- 04549
- '24543'
Notice that the single quote around 04959 is not preserved. Does anyone know how to fix it? Thanks.
Metadata
Metadata
Assignees
Labels
No labels