locked
Serializing Enum Values in Lowercase RRS feed

  • Question

  • User-1245426334 posted

    Hi!

    I have a few enums I'm using, and, when they get serialized, I'd like to have them be in lowercase.

    I found this over at StackOverflow: http://stackoverflow.com/questions/22908204/howto-decorate-json-net-stringenumconverter

    However, I can't get Visual Studio to recognize the EnumMember attribute. I already have using statements for Newtonsoft.Json and System.Runtime.Serialization (the namespace MSDN says the EnumMember attribute exists).

    I feel like I'm missing something really simple, so hopefully someone here can help.

    Thanks!

    -Eric

    Tuesday, July 19, 2016 2:47 PM

Answers

  • User-1245426334 posted

    Oh... never mind. Either VS or something I entered was wrong. Including a using statement with System.Runtime.Serialization was correct.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 19, 2016 2:53 PM