Last active
December 10, 2015 21:28
-
-
Save markcoleman/4494882 to your computer and use it in GitHub Desktop.
NancyFX Bootstrapper with Unity and Json.Net Json.Net is also configure with CamelCaseProperyNameContractResolver()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Bootstrapper : UnityNancyBootstrapper | |
{ | |
protected override void RegisterTypes(IUnityContainer container, IEnumerable<TypeRegistration> typeRegistrations) | |
{ | |
base.RegisterTypes(container, typeRegistrations); | |
container.RegisterInstance( | |
JsonSerializer.Create(new JsonSerializerSettings() | |
{ | |
ContractResolver = new CamelCasePropertyNamesContractResolver() | |
})); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment