From a444322988b6e40bf2a3ad6089da2566ffcea5a4 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Mon, 12 Mar 2018 15:53:38 +1300 Subject: [PATCH] Docs --- Doc/SerializationAttributes.aml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/SerializationAttributes.aml b/Doc/SerializationAttributes.aml index bf15d0fe2..4f0ff9cf4 100644 --- a/Doc/SerializationAttributes.aml +++ b/Doc/SerializationAttributes.aml @@ -51,14 +51,13 @@ (a member must have the JsonProperty or DataMember attribute to be serialized), opt-out (everything is serialized by default but can be ignored with the JsonIgnoreAttribute, Json.NET's default behavior) or fields (all public and private fields are serialized and properties are ignored). + Placing the the T:System.Runtime.Serialization.DataContractAttribute + on a type is another way to default member serialization to opt-in. The NamingStrategy setting on this attributes can be set to a T:Newtonsoft.Json.Serialization.NamingStrategy type that specifies how property names are serialized. Json.NET serializes .NET classes that implement IEnumerable as a JSON array populated with the IEnumerable values. Placing the T:Newtonsoft.Json.JsonObjectAttribute overrides this behavior and forces the serializer to serialize the class's fields and properties. - The T:System.Runtime.Serialization.DataContractAttribute - can be used as substitute for JsonObjectAttribute. The DataContractAttribute will default member - serialization to opt-in.