Json.NET configuration

Jan 25, 2011 at 7:56 PM


Is it possible to change the configuration for the Json.NET serializer. I want to use indenting when developing and in general set NullValueHandling to Ignore.

Thank you in advance,


Feb 1, 2011 at 5:22 AM

This functionality has been added.  You can add a [JsonNetSettings] attribute on a class or a service method (or both).  If you have more advanced needs when creating your serializer (such that static settings on the JsonNetSettings attribute are no adequate), you can override GetSerializerSettings() in your class that inherits from RestHttpHandler, and return any custom created JsonSerializerSettings you want.  Note that all of this is tightly coupled to Json.NET.


Thanks for the suggestions!  Happy to get them in the library for you =)