title: How do I handle erroneously-detected reference loops with JsonConvert.SerializeObject() when JsonCoverters need to be passed?
body: <p>We have a need to serialize objects with versioning, so we are encapsulating them in an envelope:</p>
  <pre><code>protected void OnStateChanged(Object state) 
  {
      var envelope = new WorkerStateData&lt;Object&gt; 
      {
          StateVersion = workerConfig.CurrentStateVersion,
          Value = state
      };
      String serializedState = JsonConvert.SerializeObject(envelope, new VersionConverter());
  }
  
  </code></pre>
  <p>With one of our entities that need to be serialized, Newtonsoft is detecting a reference loop. I've confirmed that no such loop exists by forcing serialization <code>ReferenceLoopHandling.Serialize</code>:</p>
  <pre><code>var serializeSettings = new JsonSerializerSettings();
  serializeSettings.ReferenceLoopHandling = ReferenceLoopHandling.Serialize;
  String serialized = JsonConvert.SerializeObject(state, Formatting.Indented, serializeSettings);
  </code></pre>
  <p>This test serialization succeeds with no reference loop.</p>
  <p>The problem is that there doesn't seem to be an overload of <code>JsonConvert.SerializeObject</code> which accepts both <code>JsonSerializerSettings</code> and <code>JsonConverter[]</code>. Without having both of those pieces of functionality, I can't integrate this fix into our main code base.</p>
  <p>Can anyone suggest another way to bypass the reference loop check?</p>