-Documentation
This commit is contained in:
@@ -124,6 +124,10 @@
|
|||||||
<para>The <codeEntityReference>T:Newtonsoft.Json.JsonExtensionDataAttribute</codeEntityReference> instructs the
|
<para>The <codeEntityReference>T:Newtonsoft.Json.JsonExtensionDataAttribute</codeEntityReference> instructs the
|
||||||
<codeEntityReference>T:Newtonsoft.Json.JsonSerializer</codeEntityReference> to deserialize properties with no matching field or property
|
<codeEntityReference>T:Newtonsoft.Json.JsonSerializer</codeEntityReference> to deserialize properties with no matching field or property
|
||||||
on the type into the specified collection. During serialization the values in this collection are written back to the instance's JSON object.</para>
|
on the type into the specified collection. During serialization the values in this collection are written back to the instance's JSON object.</para>
|
||||||
|
|
||||||
|
<alert class="note">
|
||||||
|
<para>All extension data values will be written during serialization, even if a property the same name has already been written.</para>
|
||||||
|
</alert>
|
||||||
<para>This example shows the JsonExtensionDataAttribute being applied to a field, unmatched JSON properties being added to the field's collection during deserialization.</para>
|
<para>This example shows the JsonExtensionDataAttribute being applied to a field, unmatched JSON properties being added to the field's collection during deserialization.</para>
|
||||||
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Types" title="Types" />
|
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Types" title="Types" />
|
||||||
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Usage" title="Usage" />
|
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Usage" title="Usage" />
|
||||||
|
|||||||
@@ -706,10 +706,7 @@ namespace Newtonsoft.Json.Linq
|
|||||||
/// <param name="propertyName">Name of the property.</param>
|
/// <param name="propertyName">Name of the property.</param>
|
||||||
protected virtual void OnPropertyChanged(string propertyName)
|
protected virtual void OnPropertyChanged(string propertyName)
|
||||||
{
|
{
|
||||||
if (PropertyChanged != null)
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
{
|
|
||||||
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !(PORTABLE40 || PORTABLE || NET20)
|
#if !(PORTABLE40 || PORTABLE || NET20)
|
||||||
@@ -719,10 +716,7 @@ namespace Newtonsoft.Json.Linq
|
|||||||
/// <param name="propertyName">Name of the property.</param>
|
/// <param name="propertyName">Name of the property.</param>
|
||||||
protected virtual void OnPropertyChanging(string propertyName)
|
protected virtual void OnPropertyChanging(string propertyName)
|
||||||
{
|
{
|
||||||
if (PropertyChanging != null)
|
PropertyChanging?.Invoke(this, new PropertyChangingEventArgs(propertyName));
|
||||||
{
|
|
||||||
PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user