diff --git a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs index 3cfc3a8e..005e3d7f 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs @@ -69,7 +69,6 @@ using Newtonsoft.Json.Utilities; using System.Reflection; #if !NET20 && !SILVERLIGHT using System.Xml.Linq; -using System.Text.RegularExpressions; using System.Collections.Specialized; using System.Linq.Expressions; #endif @@ -10192,6 +10191,11 @@ Parameter name: value", Domain = samAccountName.Split('\\')[0]; UserName = samAccountName.Split('\\')[1]; } + + public DirectoryAccount() + { + _additionalData = new Dictionary(); + } } #if !NETFX_CORE diff --git a/Src/Newtonsoft.Json/JsonConvert.cs b/Src/Newtonsoft.Json/JsonConvert.cs index 847d7dff..5fa341c9 100644 --- a/Src/Newtonsoft.Json/JsonConvert.cs +++ b/Src/Newtonsoft.Json/JsonConvert.cs @@ -940,7 +940,7 @@ namespace Newtonsoft.Json } /// - /// Serializes the XML node to a JSON string using formatting and omits the root object if is true. + /// Serializes the XML node to a JSON string using formatting and omits the root object if is true. /// /// The node to serialize. /// Indicates how the output is formatted. @@ -964,7 +964,7 @@ namespace Newtonsoft.Json } /// - /// Deserializes the XmlNode from a JSON string nested in a root elment specified by . + /// Deserializes the XmlNode from a JSON string nested in a root elment specified by . /// /// The JSON string. /// The name of the root element to append when deserializing. @@ -975,7 +975,7 @@ namespace Newtonsoft.Json } /// - /// Deserializes the XmlNode from a JSON string nested in a root elment specified by + /// Deserializes the XmlNode from a JSON string nested in a root elment specified by /// and writes a .NET array attribute for collections. /// /// The JSON string. @@ -1018,7 +1018,7 @@ namespace Newtonsoft.Json } /// - /// Serializes the to a JSON string using formatting and omits the root object if is true. + /// Serializes the to a JSON string using formatting and omits the root object if is true. /// /// The node to serialize. /// Indicates how the output is formatted. @@ -1042,7 +1042,7 @@ namespace Newtonsoft.Json } /// - /// Deserializes the from a JSON string nested in a root elment specified by . + /// Deserializes the from a JSON string nested in a root elment specified by . /// /// The JSON string. /// The name of the root element to append when deserializing. @@ -1053,7 +1053,7 @@ namespace Newtonsoft.Json } /// - /// Deserializes the from a JSON string nested in a root elment specified by + /// Deserializes the from a JSON string nested in a root elment specified by /// and writes a .NET array attribute for collections. /// /// The JSON string. diff --git a/Src/Newtonsoft.Json/JsonExtensionDataAttribute.cs b/Src/Newtonsoft.Json/JsonExtensionDataAttribute.cs index 48272f93..c6b25c95 100644 --- a/Src/Newtonsoft.Json/JsonExtensionDataAttribute.cs +++ b/Src/Newtonsoft.Json/JsonExtensionDataAttribute.cs @@ -3,14 +3,31 @@ namespace Newtonsoft.Json { /// - /// Instructs the to populate properties with no matching class member onto the specified collection. + /// Instructs the to deserialize properties with no matching class member into the specified collection + /// and write values during serialization. /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] public class JsonExtensionDataAttribute : Attribute { + /// + /// Gets or sets a value that indicates whether to write extension data when serializing the object. + /// + /// + /// true to write extension data when serializing the object; otherwise, false. The default is true. + /// public bool WriteData { get; set; } + + /// + /// Gets or sets a value that indicates whether to read extension data when deserializing the object. + /// + /// + /// true to read extension data when deserializing the object; otherwise, false. The default is true. + /// public bool ReadData { get; set; } + /// + /// Initializes a new instance of the class. + /// public JsonExtensionDataAttribute() { WriteData = true;