I'm storing objects in my saga data that have properties that should be ignored during serialization and deserialization. I've tried marking these properties with both [NonSerialized] and [JsonIgnore] (and annotating the classes with [DataContract] and not making those properties [DataMember]...) and nothing seems to do the trick. No matter what I do, when NServiceBus calls Json.NET to persist the saga data all the properties get serialized. I've also tried implementing a custom JsonConverter for the objects in question, and that gets ignored as well (yes, I'm annotating the object type with [JsonConverter(typeof(MyConverter))]...)
Is there a way to get saga persistence to ignore a property in an object contained within the saga data? For reference, I'm using NServiceBus 3.2.7, Json.NET 4.5.7, and RavenDB build 960. The bus is configured to use RavenDB persistence and saga persistence.