> > On Sat, May 22, 2010 at 8:41 AM, cosullivan <
cain.osulli...@gmail.com>wrote:
>
> >> Hi,
>
> >> I have a class which uses a simple enum
>
> >> enum Gender { Male, Female }
>
> >> This is being serialized in the JSON document as the numerical value,
> >> however, the JsonEnumConverter is expecting it to be read out as a
> >> string and therefore I get the following exception;
>
> >> Unhandled Exception: System.InvalidCastException: Unable to cast
> >> object of type
> >> 'System.Int64' to type 'System.String'.
> >> at Raven.Database.Json.JsonEnumConverter.ReadJson(JsonReader
> >> reader, Type obj
> >> ectType, Object existingValue, JsonSerializer serializer)
>
> >> Is this a bug, or is there some other way to deal with Enums in Raven?
>
> >> Regards,