title: Can't serialize an object with Json.Net
body: <p>I have the following object and I am trying to serialize it to Json with Json.NET</p>
  
  <pre><code>[Serializable]
  public class FlightSelection : IEquatable&lt;FlightSelection&gt;
  {
      public static readonly DateTime InitialDate;
  
      public FlightSelection();
  
      public FlightWeekSelectionType FlightWeekSelectionType { get; set; }
      public bool IsValidProposalLineWeeksExists { get; }
      public int Play { get; set; }
      public List&lt;ProposalLineWeek&gt; ProposalLineWeeks { get; set; }
      public int SelectedCount { get; }
      public int Skip { get; set; }
  
      public void ApplyPattern();
      public bool Equals(FlightSelection other);
      public override bool Equals(object obj);
      public bool[] ToBoolArray();
      public override string ToString();
  }
  </code></pre>
  
  <p>I try to serialize it with following code:</p>
  
  <pre><code>var jsSettings = new JsonSerializerSettings();
  var fs = new FlightSelection();
  string json = JsonConvert.SerializeObject(fs, Formatting.None, jsSettings);
  </code></pre>
  
  <p>I get the following error: <code>The 'obj' argument is not a FlightSelection object.</code></p>
  
  <p>I can't really understand why.  The only place in the object where I see 'obj' is in the Equals method.  Why does the serializer care about a method.</p>
  
  <p>Am I missing something simple?</p>
  
  <p>EDIT: Stack trace as requested in comments: </p>
  
  <blockquote>
    <p>at CC.Fusion.Business.Model.FlightSelection.Equals(Object obj)
       at System.Collections.Generic.ObjectEqualityComparer<code>1.IndexOf(T[] array, T value, Int32 startIndex, Int32 count)
       at System.Array.IndexOf[T](T[] array, T value, Int32 startIndex, Int32 count)
       at System.Collections.Generic.List</code>1.IndexOf(T item)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract&amp; memberContract, Object&amp; memberValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
       at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
       at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
       at Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Type type, Formatting formatting, JsonSerializerSettings settings)
       at Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Formatting formatting, JsonSerializerSettings settings)
       at APProxyServer.APProxy.GetProposal(Int32 proposalID) in c:\Code.Net\ClearChannel\Sandbox\APProxyServer\APProxy\APProxy.svc.cs:line 194
       at SyncInvokeGetProposal(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)</p>
  </blockquote>