-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
@@ -395,7 +395,15 @@ namespace Newtonsoft.Json.Schema
if (value == null)
return true;
return ((value & flag) == flag);
bool match = ((value & flag) == flag);
if (match)
return true;
// integer is a subset of float
if (value == JsonSchemaType.Float && flag == JsonSchemaType.Integer)
return true;
return false;
}
private JsonSchemaType GetJsonSchemaType(Type type, Required valueRequired)