Closed dstj closed 8 years ago
I had the same issue. Unless I explicitly specify the JsonNetSerializer in bootstrapper, it wouldn't be used, because the assembly reference gets removed at compile time. As mentioned in: https://github.com/NancyFx/Nancy/wiki/Bootstrapper.
Can confirm the problem and that this solves it!
Adding an explicit registration for ISerializer
still doesn't apply custom json serializer. Not only that, it also looses default json serializer settings since i'm seeing default camel casing no longer being applied.
I just created a sample using
Nancy
Nancy.Hosting.Aspnet
Nancy.Serialization.JsonNet
And it is picking up JsonNetSerializer
just fine. In order to customize the behavior, of the serializer, explicitly register your JsonSerializer
, in ConfigureApplicationContainer
after you've call base.ConfigureApplicationContainer()
. See https://github.com/NancyFx/Nancy.Serialization.JsonNet/issues/44#issuecomment-263029952 for a functioning sample.
Hi, a small issue,
In order to use Nancy.Serialization.JsonNet with Nancy 1.4.3, I had to manually register the
ISerializer
and theCustomJsonSerializer
, otherwise the custom serializer would not be used.The home page doc states that we only need to register the customer serializer.
Thanks.