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


DeserializeObject<T>(String, JsonSerializerSettings) not using JsonSerializerSettings


None of the DeserializeObject overloads seem to be implementing the JsonSerializerSettings that are passed in. What is the expected behavior for this?
After pulling the source and looking at it, I have found that to at least implement the NullValueHandling you can add a check in class JsonSerializerInternalReader method PopulateList.
if (value != null || (this.Serializer.NullValueHandling == NullValueHandling.Include))
wrappedList.Add (value);
See attachment to view the context of the input being used for this.

file attachments

Closed May 1, 2012 at 4:23 AM by JamesNK
Null value handling like this is only for properties, not collections.