title: Deserialize partial JSON
body: <p>I'm trying to deserialize some partial JSON received from an old SignalR service.</p>
  
  <p>This is an example of the original JSON:</p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "opt": {
      "data": {
        "DR": [{
            "O": [
              null,
              "18:46.401",
              "RGGW.GWWWR",
              "4.1",
              19,
              "17.852",
              "42.455",
              "",
              null,
              "+3.893",
              "277",
              "306",
              "",
              "310",
              "+0.058",
              null
            ],
            "OC": [
              "1"
            ]
          },
          {
            "O": [
              null,
              "1:41.119",
              "GYYG.WWWWW",
              "1.0",
              2,
              "17.561",
              "43.485",
              "40.073",
              null,
              "+16.772",
              "275",
              "291",
              "218",
              "291",
              "+16.772",
              null
            ],
            "OC": [
              "1"
            ]
          }
        ]
      }
    }
  }
  </code></pre>
  
  <p>and this the partial JSON received:</p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "opt": {
      "data": {
        "DR": {
          "1": {
            "O": {
              "2": "WYYW.WWWWW",
              "7": "42.283",
              "12": "212"
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>and these are my classes:</p>
  
  <pre><code>    public class DR2
      {
          [JsonProperty("O")]
          public List&lt;object&gt; O { get; set; }
          [JsonProperty("OC")]
          public List&lt;string&gt; OC { get; set; }
      }
  
      public class Data4
      {
          [JsonProperty("DR")]
          public List&lt;DR2&gt; DR { get; set; }
      }
  
      public class Opt
      {
          [JsonProperty("data")]
          public Data4 data { get; set; }
      }
  
      public class SPFeed
      {
          [JsonProperty("opt")]
          public Opt opt { get; set; }
      }
  </code></pre>
  
  <p>Trying to deserialize I receive the classic error: </p>
  
  <blockquote>
    <p>JsonSerializationException: Cannot deserialize the current JSON object ... because the type requires a JSON array.</p>
  </blockquote>
  
  <pre><code>SPFeed partial_opt = JsonConvert.DeserializeObject&lt;SPFeed&gt;(test); // The error above
  </code></pre>
  
  <p>Also, trying to merge the 2 JSON with the code below, no merge made, but only substitution:</p>
  
  <pre><code>var object1 = JObject.Parse(JsonConvert.SerializeObject(spfeed));
  var object2 = JObject.Parse(JsonConvert.SerializeObject(partial_opt));
  
  
  
  object1.Merge(object2, new JsonMergeSettings
  {
      MergeArrayHandling = MergeArrayHandling.Merge
  });
  </code></pre>
  
  <p>I think because the partial JSON in not a correct array.
  Any other method to deserialize?</p>