-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
+8 -8
View File
@@ -642,7 +642,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous serialize operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// </returns>
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => SerializeObject(value))")]
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value))")]
public static Task<string> SerializeObjectAsync(object value)
{
return SerializeObjectAsync(value, Formatting.None, null);
@@ -657,7 +657,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous serialize operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// </returns>
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => SerializeObject(value, formatting))")]
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value, formatting))")]
public static Task<string> SerializeObjectAsync(object value, Formatting formatting)
{
return SerializeObjectAsync(value, formatting, null);
@@ -674,7 +674,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous serialize operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// </returns>
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => SerializeObject(value, formatting, settings))")]
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value, formatting, settings))")]
public static Task<string> SerializeObjectAsync(object value, Formatting formatting, JsonSerializerSettings settings)
{
return Task.Factory.StartNew(() => SerializeObject(value, formatting, settings));
@@ -844,7 +844,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous deserialize operation. The value of the <c>TResult</c> parameter contains the deserialized object from the JSON string.
/// </returns>
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => DeserializeObject<T>(value))")]
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject<T>(value))")]
public static Task<T> DeserializeObjectAsync<T>(string value)
{
return DeserializeObjectAsync<T>(value, null);
@@ -863,7 +863,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous deserialize operation. The value of the <c>TResult</c> parameter contains the deserialized object from the JSON string.
/// </returns>
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => DeserializeObject<T>(value, settings))")]
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject<T>(value, settings))")]
public static Task<T> DeserializeObjectAsync<T>(string value, JsonSerializerSettings settings)
{
return Task.Factory.StartNew(() => DeserializeObject<T>(value, settings));
@@ -877,7 +877,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous deserialize operation. The value of the <c>TResult</c> parameter contains the deserialized object from the JSON string.
/// </returns>
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => DeserializeObject(value))")]
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject(value))")]
public static Task<object> DeserializeObjectAsync(string value)
{
return DeserializeObjectAsync(value, null, null);
@@ -896,7 +896,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous deserialize operation. The value of the <c>TResult</c> parameter contains the deserialized object from the JSON string.
/// </returns>
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => DeserializeObject(value, type, settings))")]
[ObsoleteAttribute("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject(value, type, settings))")]
public static Task<object> DeserializeObjectAsync(string value, Type type, JsonSerializerSettings settings)
{
return Task.Factory.StartNew(() => DeserializeObject(value, type, settings));
@@ -949,7 +949,7 @@ namespace Newtonsoft.Json
/// <returns>
/// A task that represents the asynchronous populate operation.
/// </returns>
[ObsoleteAttribute("PopulateObjectAsync is obsolete. Use the Task.Factory.StartNew method to populate an object with JSON values asynchronously: Task.Factory.StartNew(() => PopulateObject(value, target, settings))")]
[ObsoleteAttribute("PopulateObjectAsync is obsolete. Use the Task.Factory.StartNew method to populate an object with JSON values asynchronously: Task.Factory.StartNew(() => JsonConvert.PopulateObject(value, target, settings))")]
public static Task PopulateObjectAsync(string value, object target, JsonSerializerSettings settings)
{
return Task.Factory.StartNew(() => PopulateObject(value, target, settings));