title: Deserializing variable Type JSON array using DataContractJsonSerializer
body: <p>I have a JSON string in this form:</p>
  
  <pre><code>string jsonStr = "[\"A\", [\"Martini\", \"alovell\"],[\"Martin\", \"lovell\"]]"
  </code></pre>
  
  <p>I am trying to deserialize the JSON using the C# .NET deserializer  DataContractJsonSerializer with the following code snippet</p>
  
  <pre><code>MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonStr));
  DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof&lt;X&gt;);
  X data = (X)serializer.ReadObject(ms);
  </code></pre>
  
  <p>Now since the JSON array is an array of variable types I do not know what  type of object
  X should be </p>
  
  <p>If my String were </p>
  
  <pre><code>jsonStr = "[[\"Martini\", \"alovell\"],[\"Martin\", \"lovell\"]]"
  </code></pre>
  
  <p>I could use this: </p>
  
  <pre><code>X = List&lt;List&lt;String&gt;&gt; 
  </code></pre>
  
  <p>and that would work for me. I was wondering if there is any way to deserialize variable type JSON array? </p>