-Fixed not parsing some ISO date timezones
-Fixed float schema validation of integer values -Changed writing of IConvertible values to convert objects to strings -Fixed serializing proxy objects with no default constructor
This commit is contained in:
@@ -555,5 +555,30 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}", json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IntegerValidatesAgainstFloatFlags()
|
||||
{
|
||||
JsonSchema schema = JsonSchema.Parse(@"{
|
||||
""type"": ""object"",
|
||||
""$schema"": ""http://json-schema.org/draft-03/schema"",
|
||||
""required"": false,
|
||||
""properties"": {
|
||||
""NumberProperty"": {
|
||||
""required"": false,
|
||||
""type"": [
|
||||
""number"",
|
||||
""null""
|
||||
]
|
||||
}
|
||||
}
|
||||
}");
|
||||
|
||||
JObject json = JObject.Parse(@"{
|
||||
""NumberProperty"": 23
|
||||
}");
|
||||
|
||||
Assert.IsTrue(json.IsValid(schema));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user