Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quotes are getting removed from string starting with "00" on dumping yaml file #696

Open
shekhar-dahiya5 opened this issue Feb 1, 2023 · 0 comments

Comments

@shekhar-dahiya5
Copy link

Hi,

We have used safeDump() method on our yaml file. Yaml file consist of some examples that starts with "00".
When we tried to dump the yaml file, string quotes were removed. Unfortunately something is not working as expected,

examples where quotes are removed -

Input -
accountNumber: "001408",
accountNumber: "00120451921"

Output -
accountNumber: 001408,
accountNumber: 00120451921

examples where quotes are not removed -

Input-
accountNumber: "00300300175747767"
accountNumber: "00167"

Output -
accountNumber: "00300300175747767"
accountNumber: "00167"

If we use only digits below 8 (octal digits), it work fine, quotes are not removed. (This should not be the expected behavior)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant