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

condenseFlow results in invalid object keys #370

Closed
felixfbecker opened this issue Sep 6, 2017 · 1 comment
Closed

condenseFlow results in invalid object keys #370

felixfbecker opened this issue Sep 6, 2017 · 1 comment

Comments

@felixfbecker
Copy link

felixfbecker commented Sep 6, 2017

jsYaml.safeDump({key: 'value'}, {
    flowLevel: 0,
    indent: 0,
    lineWidth: Infinity,
    noCompatMode: true,
    sortKeys: true,
    noRefs: true,
    condenseFlow: true
})

results in actual YAML:

{key:value}

but parsing that with safeLoad() results in

{ 'key:value': null }

Expected YAML:

{"key":value}
# or
{key: value}

which results in

{ key: 'value' }

it would be best if the quoting of the key would be controlled by a quoteKeys setting.

cc @eseliger

@eseliger
Copy link
Contributor

eseliger commented Sep 6, 2017

Oh
Will look into that

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

2 participants