Avoid string type quote stripping in yaml
How to do it?
Dasel will automatically rewrite all string values in yaml without quotes, which can break some apps
e.g.
foo: "foo" becomes foo: foo
Hi @danwt,
Thanks for raising this issue.
As far as I'm aware, any YAML parser should only expect quoted strings when the string contains special or reserved characters. Do you know of any apps that this doesn't work for?
@TomWright @danwt Very new here and not sure if this has been fixed/addressed but I agree with @TomWright as far as the understanding of yaml structure. However would it make sense to add a flag to preserve quotes in the event there are apps that use them in any way?
I think I have encountered a practical use case where quote stripping causes issues: https://github.com/TomWright/dasel/issues/484 I have a YAML string that contains a timestamp, but I want it to remain a string literal, even though no characters are "special". If quotes are stripped, it seems to get interpreted as a timestamp.