Add support for NServiceBus message serialization via Jil
Already a Patron? skip past this section
It is expected that all developers either become a Patron to use NServiceBusExtensions. Go to licensing FAQ
Support this project by becoming a Sponsor. The company avatar will show up here with a website link. The avatar will also be added to all GitHub repositories under the NServiceBusExtensions organization.
Thanks to all the backing developers. Support this project by becoming a patron.
configuration.UseSerialization<JilSerializer>();
Customizes the instance of Options
used for serialization.
var options = new Options(
prettyPrint: true,
dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch,
includeInherited: true);
var serialization = configuration.UseSerialization<JilSerializer>();
serialization.Options(options);
Customize the creation of the JsonReader.
var serialization = configuration.UseSerialization<JilSerializer>();
serialization.ReaderCreator(stream => new StreamReader(stream, Encoding.UTF8));
Customize the creation of the JsonWriter.
var serialization = configuration.UseSerialization<JilSerializer>();
serialization.WriterCreator(stream => new StreamWriter(stream, Encoding.UTF8));
When using additional deserializers or transitioning between different versions of the same serializer it can be helpful to take explicit control over the content type a serializer passes to NServiceBus (to be used for the ContentType header).
var serialization = configuration.UseSerialization<JilSerializer>();
serialization.ContentTypeKey("custom-key");
Usages of DataBusProperty<T>
are not supported since it doesn't have a default constructor. However usage of the databus convention is supported.
Eagle designed by m. turan ercan from The Noun Project.