I have a yaml file with the following data:
apple: 1
banana: '2'
cat: "3"
Now, YAML says that we can write string values with non-quoted/single-quote/double-quote
, so if we use SafeLoader/BaseLoader parser with int resolver, the value for "apple"
is always going to be an integer, so what's the point to have non-quoted value support for string? I think, it is making the parser complex to comprehend for user?
PS: For my project, I have to deal with the type(int/string) for values of YAML, so I am curious about this. Any hint in the right direction will work for me!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…