-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:
James Newton-King
2013-10-04 22:29:32 +13:00
parent e77fdf285b
commit 107d15a38d
10 changed files with 163 additions and 18 deletions
@@ -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));
}
}
}