During deserialization of a List<> property, Json.net first checks to see if the property is null. If not, then it avoids calling the property set and simply calls Add() to the value returned by the get.
If the property is null, then it will create the list, and then call the set on that property.
This change makes the collection properties of the Error class work with Json.net. JavascriptSerializer is unaffected and should work as it did previously.
During deserialization of a
List<>
property, Json.net first checks to see if the property isnull
. If not, then it avoids calling the propertyset
and simply callsAdd()
to the value returned by theget
.If the property is null, then it will create the list, and then call the
set
on that property.This change makes the collection properties of the
Error
class work with Json.net.JavascriptSerializer
is unaffected and should work as it did previously.