Closed sunnamed434 closed 7 months ago
I’m pretty sure there’s a withdefaultquountingstyle method on the serializerbuilder that was added recently.
Thanks, solved!
var yamlSerializer = new SerializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance)
.WithDefaultScalarStyle(ScalarStyle.DoubleQuoted) // add this line
.Build();
I want to add quotes for strings when serializing a model (class), but adding attributes on properties is not my case - because I want it automated.
I checked issues on this GitHub repo and stackoverflow to find answers to my question, but without success, I saw solutions but they either did not work or just added the quotes for everything.
I think about smth like this, I guess there should be a way to do that via event emitter or in another way.