-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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user