All public and private fields are serialized. Members can be excluded using JsonIgnoreAttribute or System.NonSerializedAttribute.
This member serialization mode can also be set by marking the class with System.SerializableAttribute
and setting IgnoreSerializableAttribute on DefaultContractResolver to false.
OptIn
Only members marked with JsonPropertyAttribute or System.Runtime.Serialization.DataMemberAttribute are serialized.
This member serialization mode can also be set by marking the class with System.Runtime.Serialization.DataContractAttribute.
OptOut
All public members are serialized by default. Members can be excluded using JsonIgnoreAttribute or System.NonSerializedAttribute.
This is the default member serialization mode.