This project has moved. For the latest updates, please go here.

Deserialize a list of enum values [RESOLVED]

Jan 26, 2011 at 4:54 PM

I want to deserialize a list of enum values (as names), into a collection/array/list.

enum GemColors {
  Red, Blue, Green

class Filter {
  public GemColor[] GemColors {get;set;}

{ gemColors: ["Red", "Blue", "Green"] }

Is there a way? What's the easiest way to add that function? custom JsonConverter derived from StringEnumConverter?

Jan 26, 2011 at 5:04 PM

It works as it is. I must have had a mistake somewhere else.