DataContractJsonSerializer with object type member
问题 I have the following serialization method: private string Serialize(Message message) { byte[] json; using (var ms = new MemoryStream()) { var ser = new DataContractJsonSerializer(typeof(Message)); ser.WriteObject(ms, message); json = ms.ToArray(); } return Encoding.UTF8.GetString(json, 0, json.Length); } I'm trying to serialize the following object: [DataContract] public class Message { [DataMember(Name = "technical", Order = 1)] public Technical Technical; [DataMember(Name = "payload", Order