MemberSerialization Enumeration

Json.NET

Json.NET - Quick Starts & API Documentation MemberSerialization Enumeration
NamespacesNewtonsoft.JsonMemberSerialization
Specifies the member serialization options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum MemberSerialization
Public Enumeration MemberSerialization
public enum class MemberSerialization
Members
Member Description
OptOut All public members are serialized by default. Members can be excluded using JsonIgnoreAttribute or NonSerializedAttribute. This is the default member serialization mode.
OptIn Only members must be marked with JsonPropertyAttribute or DataMemberAttribute are serialized. This member serialization mode can also be set by marking the class with DataContractAttribute.
Fields All public and private fields are serialized. Members can be excluded using JsonIgnoreAttribute or NonSerializedAttribute. This member serialization mode can also be set by marking the class with SerializableAttribute and setting IgnoreSerializableAttribute on DefaultContractResolver to false.

Assembly: Newtonsoft.Json (Module: Newtonsoft.Json) Version: 4.5.0.0 (4.5.6.14930)