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

Wrong serialization of strings containing commas in flow style list #68

Open
FloEdelmann opened this issue Feb 20, 2024 · 2 comments
Open

Comments

@FloEdelmann
Copy link

FloEdelmann commented Feb 20, 2024

Code

val list = listOf("foo", "bar, baz")
Yaml { listSerialization = YamlBuilder.ListSerialization.FLOW_SEQUENCE }.encodeToString(list)

Expected

[ foo, 'bar, baz' ]

Actual

[ foo, bar, baz ]

YamlKt version 0.13.0.

@FloEdelmann
Copy link
Author

Workaround: Setting stringSerialization = YamlBuilder.StringSerialization.SINGLE_QUOTATION:

[ 'foo', 'bar, baz' ]

@FloEdelmann
Copy link
Author

It probably has to be fixed in the getQuotationAvailability function.

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

1 participant