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 or sets 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
true
if read-only properties are ignored during serialization; otherwise, false
.
This property was set after serialization or deserialization has occurred.
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
제품 | 버전 |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
.NET 피드백
.NET은(는) 오픈 소스 프로젝트입니다. 다음 링크를 선택하여 피드백을 제공해 주세요.