Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 22, 2012 12:14 AM by ozkary
Member
16 Points
7 Posts
Nov 21, 2012 07:51 PM|LINK
public enum RequestType { Uknown, SomeItem, OtherItem }
Is it possible to have other names when using the Json StringEnumConverter? Like for client rename SomeItem to "ReallyCoolItem" or something? Thanks!
Contributor
2034 Points
303 Posts
Nov 22, 2012 12:14 AM|LINK
yes, you can create your own enum definitions with the names that you need. The serialization will show the name (string) not the numeric value. You can also use camel casing.
Dennis van d...
Member
16 Points
7 Posts
Naming items in enum
Nov 21, 2012 07:51 PM|LINK
public enum RequestType { Uknown, SomeItem, OtherItem }Is it possible to have other names when using the Json StringEnumConverter? Like for client rename SomeItem to "ReallyCoolItem" or something? Thanks!
http://bloggingabout.net/blogs/dennis/
ozkary
Contributor
2034 Points
303 Posts
Re: Naming items in enum
Nov 22, 2012 12:14 AM|LINK
yes, you can create your own enum definitions with the names that you need. The serialization will show the name (string) not the numeric value. You can also use camel casing.
og-bit.com