I am trying to restrict one field in a class to an enum. However, when I try to get a dictionary out of class, it doesn\'t get converted to string. Instead it retains the en