Skip to content

Conversation

@dormeiri
Copy link

toyaml example:

echo '{"fruits":["apple","banana"]}' | gojq '.fruits | toyaml'
# Output: "- apple\n- banana"

fromyaml example:

echo '{"fruits":"- apple\\n- banana"}' | gojq '.fruits | fromyaml'
# Output: ["apple","banana"]

Fixes #277

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

Successfully merging this pull request may close these issues.

Encode/Decode yaml

1 participant