Skip to content

Support custom quote characters? #115

@kevinushey

Description

@kevinushey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions