tags:

views:

60

answers:

0

I tried to use JSon.Net library to serialize objec to a JSon string. If the object is null, the method does not throw exception with "null" returned. Should this be something like "{T: null}"?

 T instance = default(T); // null for example
 ///...
 string jString = JsonConvert.SerializeObject(instance); // null back
 // should it be "{T: null}", where T could be typeof(T).Name