Skip to content

Commit 4a5ec8d

Browse files
Update xml/System.Text.Json/JsonSerializerOptions.xml
Co-authored-by: Eirik Tsarpalis <[email protected]>
1 parent 238352d commit 4a5ec8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.Text.Json/JsonSerializerOptions.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ For more information, see [How to ignore properties with System.Text.Json](/dotn
711711
The default value is <see langword="false" />.</summary>
712712
<value>
713713
<see langword="true" /> if public fields are included during serialization; otherwise, <see langword="false" />.</value>
714-
<remarks>Only includes public fields during serialization and deserialization. Private fields are not included, even if IncludeFields is set to <see langword="true" />.
715-
If you need to include private fields, you would typically use properties with appropriate accessors or consider using attributes like [JsonInclude] on those fields.
714+
<remarks>This flag only enables serialization for public fields, as is the case for properties.
715+
Private members need to be opted into individually using the <see cref="T:System.Text.Json.Serialization.JsonIncludeAttribute" /> attribute.
716716
</remarks>
717717
<exception cref="T:System.InvalidOperationException">This property is set after serialization or deserialization has occurred.</exception>
718718
</Docs>

0 commit comments

Comments
 (0)