title: REST Api returning different object names for the same object, how to handle with RestSharp?
body: <p>I'm programming a C# implementation for the <a href="https://survey.qualtrics.com/WRAPI/ControlPanel/docs.php" rel="nofollow">Qualtrics API</a> (v 2.5) using <a href="http://restsharp.org/" rel="nofollow">RestSharp</a>. When calling the method <a href="https://survey.qualtrics.com/WRAPI/ControlPanel/docs.php#getUserIds_2.5" rel="nofollow">getUserIds</a>, it returns a list of users in JSON format (see the example output below). </p>
  
  <p><strong>The problem/question I face is</strong> that for each user object (the list of objects under <code>Result</code>) it generates a different id, starting with <code>URH_</code>. When using <a href="http://json2csharp.com/" rel="nofollow">json2csharp</a> it assumes ofcourse that it's always a different class, while in fact it's absolutely the same one as you can see in the output, and as is stated in the documentation of the api. <strong>How can I best resolve this - so that I can make a class <code>UserData</code> that I can reuse?</strong> Because now I obviously always see these random <code>URH_</code> prefixed classes in each response. </p>
  
  <p>NOTE: I was thinking I could try to massage the response first, and when I get the response replace each <code>URH_</code> prefixed object under the root <code>Result</code> object with a <code>"UserData"</code> string - but I feel this is breaking the rules a bit, and thought the community would have a better solution?</p>
  
  <hr>
  
  <p><em>Below is the raw JSON output (note that I removed sensitive information)</em>:</p>
  
  <pre><code>{"Meta":{"Status":"Success","Debug":""},"Result":{"URH_3wpA9pxGbE0c7Xu":{"DivisionID":null,"UserName":"user.name@domain.com","UserFirstName":"x","UserLastName":"x","UserAccountType":"UT_4SjjZmbPphZGKDq","UserEmail":"x.x@x.x","UserAccountStatus":"Active"},"URH_57vQr8MVXgpcPUo":{"DivisionID":"DV_XXXXXXXX","UserName":"jxxxx@xx.xxx","UserFirstName":"X","UserLastName":"X","UserAccountType":"UT_BRANDADMIN","UserEmail":"xxxx@xxg.xxx","UserAccountStatus":"Active"},"URH_6ujW1EP0QJOUaoI":{"DivisionID":"DV_XXXXXXXYZ","UserName":"x.xckx@xxx.xyz","UserFirstName":"x","UserLastName":"x","UserAccountType":"UT_XXXXXABCD","UserEmail":"c.c@cc.com","UserAccountStatus":"Active"}}}
  </code></pre>
  
  <p><em>This is what I get when generating a model using <a href="http://json2csharp.com/" rel="nofollow">json2csharp</a></em>:</p>
  
  <pre><code>public class Meta
  {
      public string Status { get; set; }
      public string Debug { get; set; }
  }
  
  public class URH3wpA9pxGbE0c7Xu
  {
      public object DivisionID { get; set; }
      public string UserName { get; set; }
      public string UserFirstName { get; set; }
      public string UserLastName { get; set; }
      public string UserAccountType { get; set; }
      public string UserEmail { get; set; }
      public string UserAccountStatus { get; set; }
  }
  
  public class URH57vQr8MVXgpcPUo
  {
      public string DivisionID { get; set; }
      public string UserName { get; set; }
      public string UserFirstName { get; set; }
      public string UserLastName { get; set; }
      public string UserAccountType { get; set; }
      public string UserEmail { get; set; }
      public string UserAccountStatus { get; set; }
  }
  
  public class URH6ujW1EP0QJOUaoI
  {
      public string DivisionID { get; set; }
      public string UserName { get; set; }
      public string UserFirstName { get; set; }
      public string UserLastName { get; set; }
      public string UserAccountType { get; set; }
      public string UserEmail { get; set; }
      public string UserAccountStatus { get; set; }
  }
  
  public class Result
  {
      public URH3wpA9pxGbE0c7Xu URH_3wpA9pxGbE0c7Xu { get; set; }
      public URH57vQr8MVXgpcPUo URH_57vQr8MVXgpcPUo { get; set; }
      public URH6ujW1EP0QJOUaoI URH_6ujW1EP0QJOUaoI { get; set; }
  }
  
  public class RootObject
  {
      public Meta Meta { get; set; }
      public Result Result { get; set; }
  }
  </code></pre>