title: System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject ignores NonSerialized attribute while serializing
body: <p>If i try to serialize an object of the following ClassToSerialize class with System.Runtime.Serialization.Json.DataContractJsonSerializer</p>
  
  <pre><code>[DataContract,Serializable]
  public class ClassToSerialize
  {
      [NonSerialized] private bool _mf;
      public bool IsMf
      { 
          get { return _mf};
          set{ _mf = value;} 
      }
  
      [DataMember]
      public char PrimaryExc { get; set; }        
  }
  
  public class TestClass
  {
      ClassToSerialize obj = new ClassToSerialize{PrimaryExchange = 'a', NoResults = true};
      var serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(ClassToSerialize);
      var ms = new MemoryStream();
      serializer.WriteObject(ms, obj);
      return Encoding.UTF8.GetString(ms.ToArray());
  }
  </code></pre>
  
  <p>The return string still contains IsMf property and its value. The NOnSerialized attribute is ignored. Can someone please suggest what attribute to use when using DataContractJsonSerializer so as to not serialize some properties</p>