-Fixed flag enum items not being correctly camel cased

-Fixed JsonValidatingReader not validating the first array item twice
-Fixed JsonSchema not correctly validating integers as a subset of decimal
-Changed JsonTextReader.Culture to be CultureInfo.InvariantCulture by default
This commit is contained in:
JamesNK
2011-11-18 09:36:01 +00:00
parent da7e4508d7
commit 5831b11de1
8 changed files with 240 additions and 9 deletions
+7 -3
View File
@@ -214,10 +214,14 @@ namespace Newtonsoft.Json
if (!CollectionUtils.IsNullOrEmpty(schema.Items))
{
if (schema.Items.Count == 1)
{
schemas.Add(schema.Items[0]);
if (schema.Items.Count > (_currentScope.ArrayItemCount - 1))
schemas.Add(schema.Items[_currentScope.ArrayItemCount - 1]);
}
else
{
if (schema.Items.Count > (_currentScope.ArrayItemCount - 1))
schemas.Add(schema.Items[_currentScope.ArrayItemCount - 1]);
}
}
if (schema.AllowAdditionalProperties && schema.AdditionalProperties != null)