-Fixed potential race condition serializing F# objects

-Fixed schema divisible sometimes incorrectly validating to false
-Fixed not calling virtual ShouldSerialize methods
This commit is contained in:
James Newton-King
2014-03-31 15:47:36 +13:00
parent de5f7dd8a8
commit 6965fcfa46
63 changed files with 4992 additions and 3302 deletions
@@ -13,7 +13,6 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
{
#region Usage
JsonSchema schema = JsonSchema.Parse(@"{
'description': 'A person',
'type': 'object',
'properties': {
'name': {'type':'string'},
@@ -29,7 +28,8 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
'hobbies': ['.NET', 'Blogging', 'Reading', 'Xbox', 'LOLCATS']
}");
bool valid = person.IsValid(schema);
IList<string> errorMessages;
bool valid = person.IsValid(schema, out errorMessages);
Console.WriteLine(valid);
// true