Json.Net deserialization with case sensitive enum values not working

Feb 6, 2013 at 9:23 AM
(Crosspost: [http://stackoverflow.com/questions/14690479/json-net-deserialization-with-case-sensitive-enum-values-not-working] (Stackoverflow Question) )

I have the following types:
public class ResponseMessage
{
    public MenuItemDefinitions Foo { get; set; }
}

public enum MenuItemDefinitions
{
    B,
    b,
    C,
    c,
}
The following code should deserialize a json message into my class structure:
JsonSerializer serializer = new JsonSerializer();

  serializer.Converters.Add(new StringEnumConverter());

  using (TextReader tr = new StringReader(baz))
  using (JsonReader jr = new JsonTextReader(tr))
  {
      return serializer.Deserialize<ResponseMessage>(jr);
  }
Unfortunately i receive the following ErrorMessage:
System.InvalidOperationException was unhandled
  HResult=-2146233079
  Message=Enum name 'e' already exists on enum 'MenuItemDefinitions'.
  Source=Newtonsoft.Json
 ...
I can not find a customization point in Json.Net which allows me to "switch on" the case sensitive deserialization.

Any help appreciated.