New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outdated code from 08/2012 post #7
Comments
@fagnercarvalho sure, the article is very old. As far as I remember, I was playing with NancyFX 0.0.9 (or something) that time.. Nancy is well known for friendliest community ever, so do not hesitate and ping those guys :) /cc @jchannon |
You shouldn't need to do that, should just install Nancy.Serializers.JsonNet and Nancy will pick that serializer up and use that. 😄 |
I think this is still valid, you may want to use some serializer which is not JsonNet. In my case, i really dont understand why nancy has its own version of the same serializer inside System.Web.Script.Serialization. Should default serializer in nancy use rather this class than its own implementation of the same. |
Nancy has no dependency on System.Web and doesn't have that serializer you mention as its default. It uses one from the mono team and then amended where needs be. |
Ok, all the classes just look exactly the same. But some methods are missing in the default one. My problem is that I had already implemented all the converters for special classes and those converters will not work with the default serializer. In any case the code above work for replacing the serializer with any other one, not necessarily Json.Net. |
The following post is outdated according to the newer NancyFX version (1.2.0.0).
I was getting a compilation error in the JsonNetSerializer because a Extensions property was missing and after that I get a runtime exception:
To solve that I change the bootstrapper code to that:
I dont know if this is the best approach right now but its working here.
What you think?
The text was updated successfully, but these errors were encountered: