Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Add support for NServiceBus message serialization via Jil

License

Notifications You must be signed in to change notification settings

simoncropparchived/NServiceBus.Jil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NServiceBus.Jil

Build status NuGet Status

Add support for NServiceBus message serialization via Jil

Already a Patron? skip past this section

Community backed

It is expected that all developers either become a Patron to use NServiceBusExtensions. Go to licensing FAQ

Sponsors

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.

Patrons

Thanks to all the backing developers. Support this project by becoming a patron.

Usage

configuration.UseSerialization<JilSerializer>();

snippet source | anchor

Custom settings

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);

snippet source | anchor

Custom reader

Customize the creation of the JsonReader.

var serialization = configuration.UseSerialization<JilSerializer>();
serialization.ReaderCreator(stream => new StreamReader(stream, Encoding.UTF8));

snippet source | anchor

Custom writer

Customize the creation of the JsonWriter.

var serialization = configuration.UseSerialization<JilSerializer>();
serialization.WriterCreator(stream => new StreamWriter(stream, Encoding.UTF8));

snippet source | anchor

Custom content key

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");

snippet source | anchor

Currently not supported

Usages of DataBusProperty<T> are not supported since it doesn't have a default constructor. However usage of the databus convention is supported.

Icon

Eagle designed by m. turan ercan from The Noun Project.

About

Add support for NServiceBus message serialization via Jil

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 6

Languages