This project has moved. For the latest updates, please go here.

Serialize/Deserialize null bool? as empty string

Jan 3, 2013 at 3:43 AM

I would to serialize a property of type Nullable<bool> as an empty string, as this will resolve a few issues with type conversions in Knockout bindings.


My first thought was to add a JsonConverter  to the serializers converters collection, but it is not invoked.

Investigations ( ie poking around with reflector) reveal a few short circuits in code that handles null values directly and I can't seem to bypass that behaviour.


Any advice ?