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

YAML strings containing a colon followed by a space should be quoted #12

Open
paulrbr-fl opened this issue Aug 31, 2020 · 1 comment · May be fixed by #15
Open

YAML strings containing a colon followed by a space should be quoted #12

paulrbr-fl opened this issue Aug 31, 2020 · 1 comment · May be fixed by #15

Comments

@paulrbr-fl
Copy link

Hello this bug report was originally posted in dhall-lang/dhall-haskell#1939 (comment) byt the incorrect configuration (with dhall-to-yaml --version v1.7.1) seem to be because of a change in aeson-yaml (which removed the comment warning about the : string sequence. See the bug in action:

> dhall-to-yaml --version
1.7.1

> dhall version
1.34.0

> dhall-to-yaml <<< '{ headers = ["Location: https://example.com"] }'
headers:
  - Location: https://example.com

> dhall <<< '{ headers = ["Location: https://example.com"] }'
{ headers = [ "Location: https://example.com" ] }

The YAML generated value is a Hash containing a List containing… another Hash!
Whereas the normalised form output from dhall is (correctly 😌) a Hash containing a List containing a String.

@sjakobi
Copy link
Contributor

sjakobi commented May 27, 2021

Here's another instance (from dhall-lang/dhall-haskell#2192):

$ echo '{"b":"c:","a":["v:"]}' | json-to-yaml 
a:
  - v:
b: c:

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 a pull request may close this issue.

2 participants