-Change BSON writer to write new binary subtype

-Fix BSON reader to read the old binary subtype correctly
-Added JsonNet35BinaryCompadibility to BSON reader for incorrectly written BSON binary values
-Changed JSON schema to use required flags instead of optional as defined in JSON schema spec 3.0
-Changed JSON schema to use divisibleBy instead of maxDecimals as defined in JSON schema spec 3.0
-Fixed detection of serialization specified flag properties
-Updated to latest version of NuGet
This commit is contained in:
JamesNK
2010-12-19 00:29:41 +00:00
parent 2e7b8e5279
commit 5ccd826951
20 changed files with 194 additions and 80 deletions
@@ -89,13 +89,13 @@ namespace Newtonsoft.Json.Tests.Schema
[Test]
public void ValidateFailureWithOutLineInfoBecauseOfEndToken()
{
JsonSchema schema = JsonSchema.Parse("{'properties':{'lol':{}}}");
JsonSchema schema = JsonSchema.Parse("{'properties':{'lol':{'required':true}}}");
JObject o = JObject.Parse("{}");
List<string> errors = new List<string>();
o.Validate(schema, (sender, args) => errors.Add(args.Message));
Assert.AreEqual("Non-optional properties are missing from object: lol.", errors[0]);
Assert.AreEqual("Required properties are missing from object: lol.", errors[0]);
Assert.AreEqual(1, errors.Count);
}