-Added ObjectCreationHandling to JsonPropertyAttribute

-Added IValueProvider, ReflectionValueProvider, DynamicValueProvider
-Added Dynamic.snk
-Added Required enum with options Default, AllowNull and Always
-Added serialization event support to Silverlight version
-Added Converter to JsonProperty for JsonConverter
-Changed IsRequired to Required enum
-Changed schema generator to allow for Required enum options
-Changed Silverlight project version to Silverlight 3
-Improved error message when JSON array encountered for object and vice-versa when deserializing
-Improved error message for converting types when deserializing
-Improved error message from getting and setting properties when serializing and deserializing
-Fixed empty string being converted to null when deserializing
-Removed dependency on Entity Framework and LINQ to SQL assemblies
This commit is contained in:
JamesNK
2009-11-02 08:21:02 +00:00
parent b4b3905714
commit 2a63ea24e3
51 changed files with 1466 additions and 260 deletions
+13 -2
View File
@@ -13,6 +13,7 @@ namespace Newtonsoft.Json
internal NullValueHandling? _nullValueHandling;
internal DefaultValueHandling? _defaultValueHandling;
internal ReferenceLoopHandling? _referenceLoopHandling;
internal ObjectCreationHandling? _objectCreationHandling;
internal bool? _isReference;
/// <summary>
@@ -45,6 +46,16 @@ namespace Newtonsoft.Json
set { _referenceLoopHandling = value; }
}
/// <summary>
/// Gets or sets the object creation handling used when deserializing this property.
/// </summary>
/// <value>The object creation handling.</value>
public ObjectCreationHandling ObjectCreationHandling
{
get { return _objectCreationHandling ?? default(ObjectCreationHandling); }
set { _objectCreationHandling = value; }
}
/// <summary>
/// Gets or sets whether this property's value is serialized as a reference.
/// </summary>
@@ -65,9 +76,9 @@ namespace Newtonsoft.Json
/// Gets or sets a value indicating whether this property is required.
/// </summary>
/// <value>
/// <c>true</c> if this property is required; otherwise, <c>false</c>.
/// A value indicating whether this property is required.
/// </value>
public bool IsRequired { get; set; }
public Required Required { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="JsonPropertyAttribute"/> class.