-
Notifications
You must be signed in to change notification settings - Fork 32
Custom serializer doesn't run #55
Comments
Nancy consumes 'ISerializer' instances. You need to implement that in order for Nancy to discover and use it |
That breaks it even more. Added to bootstrap.
The JSON looks like:
Lost camel casing, null values are not ignored. Also noticed that JSON.Net version that's referenced by Nancy.Serialization.JsonNet is very, very old. |
It seems like i'm having problems with everything that Nancy is supposed to magically pick up and run. (i.e. I'm using FluentValidation with Nancy which also had the same problem until i explicitly added it to dependency registration). So this makes me wonder if the problem is in how i'm running Nancy? I'm using Topshelf and Nancy.Hosting.Self to host it in a windows service. Update 1 Update 2
This is working! Rookie mistake. Sorry I'm new to Nancy :( |
@sakopov that registration is literally the ONLY way it will work for me using the |
@ryanulit I know it's been a while but could you please show an example |
@YuriGal here's what worked for me, but this is 2+ years old so there may be a better way now:
And the CustomJsonSerializer class:
And here's my packages.config for version references:
|
@ryanulit Thank you so much for the prompt response! I figured it as far as |
The
CustomJsonSerializer
constructor never executes. The JSON response still has null properties.What's missing?
The text was updated successfully, but these errors were encountered: