SharpYaml
SharpYaml copied to clipboard
Convert the properties names from snake_case to PascalCase
trafficstars
I am using snake_case on an YAML file and deserializing it as follows:
serializer = new Serializer(new SerializerSettings {
DefaultStyle = YamlStyle.Block,
EmitAlias = false,
IndentLess = true,
NamingConvention = new DefaultNamingConvention(),
PreferredIndent = 2,
SortKeyForMapping = false
});
var result = serializer.Deserialize(yaml);
I get an object where the properties names are still in snake_case like 'is_active', etc.
I need to convert the properties names from snake_case in the YAML to PascelCase in the deserialized object.
How can I do this?