<DIV>I have a message that I'm sending and one of it's properties is an abstract type. When I send this message I get an exception on the receiver from the json serializer:</DIV>
<DIV>How am I able to receive a message that has an interface or abstract type property, here MyPayload is an abstract class?</DIV>
<DIV>Thanks</DIV>
<DIV>Exception:<BR>Newtonsoft.Json.JsonSerializationException: Could not create an instance of type<BR> MyNamespace.Payloads.MyPayload. Type<BR> is an interface or abstract class and cannot be instantated. Path 'Payload.Id',<BR> line 1, position 17.<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject<BR>(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMem<BR>ber, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCo<BR>nstructor)<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js<BR>onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js<BR>onContainerContract containerContract, JsonProperty containerMember, Object exis<BR>tingValue)<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte<BR>rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem<BR>ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje<BR>ct existingValue)<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValu<BR>e(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract<BR>containerContract, JsonProperty containerProperty, JsonReader reader, Object tar<BR>get)<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(<BR>Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty m<BR>ember, String id)<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js<BR>onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js<BR>onContainerContract containerContract, JsonProperty containerMember, Object exis<BR>tingValue)<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte<BR>rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem<BR>ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje<BR>ct existingValue)<BR> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Jso<BR>nReader reader, Type objectType, Boolean checkAdditionalContent)<BR> at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type<BR> objectType)<BR> at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectT<BR>ype)<BR> at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, Jso<BR>nSerializerSettings settings)<BR> at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSeriali<BR>zerSettings settings)<BR> at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)<BR> at EasyNetQ.JsonSerializer.BytesToMessage[T](Byte[] bytes)<BR> at EasyNetQ.RabbitAdvancedBus.<>c__DisplayClass1`1.<Subscribe>b__0(Byte[] bod<BR>y, MessageProperties properties, MessageReceivedInfo messageRecievedInfo)<BR> at EasyNetQ.RabbitAdvancedBus.<>c__DisplayClass7.<Subscribe>b__6(String consu<BR>merTag, UInt64 deliveryTag, Boolean redelivered, String exchange, String routing<BR>Key, IBasicProperties properties, Byte[] body)<BR> at EasyNetQ.QueueingConsumerFactory.HandleMessageDelivery(BasicDeliverEventAr<BR>gs basicDeliverEventArgs)<BR></DIV>
<DIV> </DIV>