-Added support for ShouldSerialize conditional methods

-Fixed not correctly skipping ignored JSON properties when deserializing via a non-default constructor
This commit is contained in:
JamesNK
2010-03-20 09:16:24 +00:00
parent d393430f30
commit 408a407105
13 changed files with 120 additions and 23 deletions
@@ -360,7 +360,8 @@ namespace Newtonsoft.Json.Schema
if (!property.Ignored)
{
bool optional = property.NullValueHandling == NullValueHandling.Ignore ||
property.DefaultValueHandling == DefaultValueHandling.Ignore;
property.DefaultValueHandling == DefaultValueHandling.Ignore ||
property.ShouldSerialize != null;
JsonSchema propertySchema = GenerateInternal(property.PropertyType, property.Required, optional);