-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Configure enum deserialization? #39
Comments
That's a fair point. Unfortunately, currently it can only be set per enum member. I have come up with a plan to implement the following features Provide multiple
The behavior can be changed globally by specifying them in YamlSerializerOptions. In addition, a feature to specify a formatter for each type, as shown below, would satisfy the request. [YamlFormatter(typeof(UpperCamelCaseEnumFormatter))]
enum Foo
{
A,
B,
C
} |
That sounds great to me. For now I have a workaround that seems ok. Thanks again. |
In #60, serialization format of enum can now be specified. [YamlObject(NamingConvention.UpperCamelCase)]
enum Foo
{
A,
B,
C
} Not that it can only be changed for each enum type. |
Hi, thanks for this library, it's great.
Is it possible to configure enum deserialization? My input yaml has enum values serialized like
Foo
,Bar
, but it looks like this library requires them to be serialized as camel case (foo
,bar
). Is it possible to have an attribute or something that specifies what casing scheme it should be deserialized with (similar to serde'srename_all
)?Thanks
The text was updated successfully, but these errors were encountered: