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

Convert the properties names from snake_case to PascalCase #63

Open
mdmoura opened this issue Oct 4, 2018 · 0 comments
Open

Convert the properties names from snake_case to PascalCase #63

mdmoura opened this issue Oct 4, 2018 · 0 comments

Comments

@mdmoura
Copy link

mdmoura commented Oct 4, 2018

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?

@mdmoura mdmoura changed the title Convert the properties names from snake_case to CamelCase Convert the properties names from snake_case to PascalCase Oct 4, 2018
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