Skip to content

SerializerSettings.DefaultStyle not working #70

@yariker

Description

@yariker

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions