public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { var type = (NotificationObject)value; writer.WriteValue(NotificationObjectEnumStringConverter.GetString(type)); }
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { var value = (string)reader.Value; return(NotificationObjectEnumStringConverter.GetNotificationObject(value)); }