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

Strings looking like dates are marshaled without quotes #430

Open
hugosandelius opened this issue Feb 28, 2024 · 0 comments · May be fixed by #515
Open

Strings looking like dates are marshaled without quotes #430

hugosandelius opened this issue Feb 28, 2024 · 0 comments · May be fixed by #515
Assignees
Labels
bug Something isn't working

Comments

@hugosandelius
Copy link

Describe the bug
A string looking like a date, e.g. "2023-12-06", is encoded without surrounding quotes. This confuses other YAML parsing libraries which interprets this as a date type (e.g. in Google Cloud APIs).

To Reproduce
unmarshal and re-marshal the following:
value: "2023-12-06"
The quotes will be removed.

Expected behavior
Strings looking like dates are always encoded with quotes.

Version Variables

  • Go version: 1.21
  • go-yaml's Version: [e.g. v1.11.3 ]
@hugosandelius hugosandelius added the bug Something isn't working label Feb 28, 2024
@shuheiktgw shuheiktgw self-assigned this Nov 8, 2024
@shuheiktgw shuheiktgw linked a pull request Nov 9, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants