title: Deserializing with a json file with inner classes with JSON.NET C#
body: <p>I have the following structure in my json file</p>
  
  <pre><code>  "missionName": "missionname",
    "thumb_image": "pics/mission-info.png",
     "uplinkPage": [
      {
          "RPC": {
              "name": "RPC",
              "rpc": "",
              "args": ""
          },
          "EXE": {
              "name": "app1",
              "prog": "",
              "args": ""
          },
          "VM": {
              "name": "VM",
              "name": "",
              "args": ""
          },
          "JAR": {
              "name": "JAR",
              "prog": "",
              "args": ""
          },
          "link": {
              "name": "somelink",
              "url": ""
          }
      }
  ],
  </code></pre>
  
  <p>for this I have the following class</p>
  
  <pre><code> public class EXE
  {
     public string name { get; set; }
     public string prog { get; set; }
     public string args { get; set; }
  }
  
  public class RPC
  {
      public string name { get; set; }
      public string rpc { get; set; }
      public string args { get; set; }
  }
  
  public class VM
  {
      public string name { get; set; }
      public string args { get; set; }
  }
  
  public class JAR
  {
      public string name { get; set; }
      public string prog { get; set; }
      public string args { get; set; }
  }
  
  public class Link
  {
      public string name { get; set; }
      public string url { get; set; }
  }
  
   public class UplinkPage
  {
      public VM[] vmList { get; set; }
      public EXE[] exeList { get; set; }
      public RPC[] rpcList { get; set; }
      public JAR[] jarList { get; set; }
      public Link[] linkList { get; set; }
  }
  
   public class Rootobject
  {
      public string missionName { get; set; }
      public string thumb_image { get; set; }     
      public Uplinkpage[] uplinkPage { get; set; }        
  }
  </code></pre>
  
  <p>the uplinkPage section can have one or many of each of the EXE, RPC, VM .. sections. I have tried to add multiply sections like this</p>
  
  <pre><code>"EXE": {
              "1": {
                  "name": "app1",
                  "data-prog": "",
                  "data-args": ""
              },
              "2": { 
                  "name": "app2",
              "data-prog": "",
              "data-args": ""
              }
          }
  </code></pre>
  
  <p>when I do the deserialization as so</p>
  
  <pre><code>Rootobject page = JsonConvert.DeserializeObject&lt;Rootobject&gt;(File.ReadAllText("mission1.json"));
  </code></pre>
  
  <p>I get an object and I can read everything except if I have multiply values of the same type, I will only get one of them. If I declare sections as array</p>
  
  <pre><code>public EXE[] exeList { get; set; }
  </code></pre>
  
  <p>I will get the last one and if as </p>
  
  <pre><code>Dictionary&lt;string,EXE&gt; exeList {get; set;}
  </code></pre>
  
  <p>I will get the first one. I have noticed that when I use the dictionary the type of the EXE changes to EXE1.</p>
  
  <p>So I was wondering what am I doing wrong? am I mission some thing here? </p>
  
  <p>cheers,
  es</p>