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

Forcing quotation of strings #482

Closed
furstenheim-geoblink opened this issue Apr 10, 2019 · 2 comments
Closed

Forcing quotation of strings #482

furstenheim-geoblink opened this issue Apr 10, 2019 · 2 comments

Comments

@furstenheim-geoblink
Copy link

Hi,
Is it possible to configure js yaml to always quote strings?
Say that I have {include_lines: ['a', 'b']} I'd like it to be dumped as:

-include_lines
  - 'a'
  - 'b'

At the moment it does not get quoted. My use case is filebeat, which does not recognized unescaped fields

@puzrin
Copy link
Member

puzrin commented Apr 10, 2019

This dupes #454.

You can just write JSON and rename it to .yml for your task.

@puzrin puzrin closed this as completed Apr 10, 2019
@rlidwka
Copy link
Member

rlidwka commented Dec 9, 2020

Added forceQuotes option in 7b256d7 (currently in dev branch).

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

3 participants