Skip to content

JSON to YAML conversion - option for explicit string quoting #1938

Answered by mikefarah
harrel56 asked this question in Q&A
Discussion options

You must be logged in to vote

Yep, you can give it a style expression to put values in double quotes, see https://mikefarah.gitbook.io/yq/operators/env-variable-operators#envsubst-options for details.

yq -Poy '.date style="double"'  file.json 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@harrel56
Comment options

Answer selected by harrel56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants