JsonSerializerOptions.IgnoreReadOnlyProperties Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether read-only properties are ignored during serialization. The default value is false
.
public:
property bool IgnoreReadOnlyProperties { bool get(); void set(bool value); };
public bool IgnoreReadOnlyProperties { get; set; }
member this.IgnoreReadOnlyProperties : bool with get, set
Public Property IgnoreReadOnlyProperties As Boolean
Property Value
true
if read-only properties are ignored during serialization; otherwise, false
.
Exceptions
This property was set after serialization or deserialization has occurred.
Remarks
A property is read-only if it contains a public getter but not a public setter.
Read-only properties are not deserialized regardless of this setting.
For more information, see How to ignore properties with System.Text.Json.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za