-Added INotifyCollectionChanged to JContainer in .NET 4.0 build

-Changed .NET 3.5 and .NET 4.0 builds to target client frameworks
-Fixed JSON Schema not raising an error for additional properties when the schema has no properties
This commit is contained in:
JamesNK
2010-09-11 22:56:13 +00:00
parent 43501484fb
commit 11ce71ee8b
8 changed files with 57 additions and 26 deletions
+3 -8
View File
@@ -552,15 +552,10 @@ namespace Newtonsoft.Json
if (_currentScope.RequiredProperties.ContainsKey(propertyName))
_currentScope.RequiredProperties[propertyName] = true;
if (schema.Properties != null && !schema.Properties.ContainsKey(propertyName))
{
IList<string> definedProperties = schema.Properties.Select(p => p.Key).ToList();
bool propertyDefinied = (schema.Properties != null && schema.Properties.ContainsKey(propertyName));
if (!schema.AllowAdditionalProperties && !definedProperties.Contains(propertyName))
{
RaiseError("Property '{0}' has not been defined and the schema does not allow additional properties.".FormatWith(CultureInfo.InvariantCulture, propertyName), schema);
}
}
if (!propertyDefinied && !schema.AllowAdditionalProperties)
RaiseError("Property '{0}' has not been defined and the schema does not allow additional properties.".FormatWith(CultureInfo.InvariantCulture, propertyName), schema);
_currentScope.CurrentPropertyName = propertyName;
}