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

Support custom quote characters? #115

Open
kevinushey opened this issue Apr 14, 2022 · 1 comment
Open

Support custom quote characters? #115

kevinushey opened this issue Apr 14, 2022 · 1 comment

Comments

@kevinushey
Copy link

Would it be possible to customize the quote character used when generating YAML? For example:

> yaml::as.yaml(as.character(Sys.Date()))
[1] "'2022-04-14'\n"

I'd like a way to tell yaml to quote fields using double quotes here, but only if quotation is required.

One can set the "quoted" attribute to force the use of double quotes, but then those quotes are applied on all string values, even those which might not require them.

@spgarbet
Copy link
Member

It's an interesting idea, but would be complicated to implement.

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

2 participants