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

SerializerSettings.DefaultStyle not working #70

Open
yariker opened this issue Nov 27, 2019 · 0 comments
Open

SerializerSettings.DefaultStyle not working #70

yariker opened this issue Nov 27, 2019 · 0 comments

Comments

@yariker
Copy link

yariker commented Nov 27, 2019

The SerializerSettings.DefaultStyle property seems to have no effect. The following code still produces a block syntax (SharpYaml v1.6.5.0):

var serializer = new Serializer(new SerializerSettings { DefaultStyle = YamlStyle.Flow });
var text = serializer.Serialize(new { List = new List<int> { 1, 2, 3 }, Name = "Hello", Value = "World!" });
Console.WriteLine(text);
// Outputs:
// List:
//   - 1
//   - 2
//   - 3
// Name: Hello
// Value: World!

Any idea why?

yariker pushed a commit to yariker/SharpYaml that referenced this issue Jan 14, 2020
xoofx added a commit that referenced this issue Feb 21, 2020
Fix serialization with DefaultStyle set to Flow (#70)
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