title: How to handle object references in JSON document with Newtonsoft Json.NET?
body: <p>I have a json dataset that comes with standard data fields and reference fields. It looks something like this:</p>
  
  <pre><code>[
      {
          "id":1,
          "name":"Book",
          "description":"Something you can read"
      },
      {
          "id":2,
          "name":"newspaper",
          "description": {
              "ref":"0.description"
          }
      }
  ]
  </code></pre>
  
  <p>This is my data model:</p>
  
  <pre><code>public class PhysicalObject {
      [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default)]
      public int id;
  
      [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default)]
      public string name;
  
      [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default)]  // FIXED should have been description not desc
      public string desc;
  }
  </code></pre>
  
  <p>Every property in the json file has a specific type such as <code>int</code> for <code>id</code>, and <code>string</code> for <code>description</code> however every property can also link to another via a <code>ref</code>. In this case, the <code>description</code> of <code>id</code>= 2 is the same as <code>id</code> = 1 </p>
  
  <p>Is there a way via Error handling or creating some kind of fallback deserialization that can be applied that can allow me to serialize the <code>ref</code>?</p>
  
  <p>Note that because of other requirements, I must use the Newtonsoft Json.NET library to resolve this. Information about other libraries or techniques to solve this are informative but probably won't resolve the issue.</p>