title: How to convert json properties that are formatted in dot notation to a c# class
body: <p>I am using <code>HttpClient</code> to retrieve data from an api. Unfortunately, I don't have control over the property names, they were all written in dot notation, for example</p>
  
  <pre><code>"staff":[{"responsible.user":"Y","staff.type":
      {"staff.type.mnemonic":"C","staff.type.name":"Consultant"}]
  </code></pre>
  
  <p>There is probably at least 100 or so properties in this json callback that are like this.
  I need to return back a json object that removes the dots (i.e. change <code>responsible.user</code> to <code>responsibleuser</code>)
  Is there a way to map a c# class and return the format I want back?</p>
  
  <p>I have a c# class using the <code>[DataContract]</code> attribute and <code>[Datamember(Name=)]</code> fields to map the values, but when I look at the json that is returned, they still have the dots in the properties.</p>
  
  <p>This is what I started to work with in my controller</p>
  
  <pre><code> using(HttpClient c = new HttpClient())
          {
              c.DefaultRequestHeaders.Authorization =
                 new System.Net.Http.Headers.AuthenticationHeaderValue(
                     "Bearer",
                     "Cazqmx-TTHOOfnJy92SRng=="
                 );
              var link = string.Format(AmsApiGet, "6894998", "TYEE");
              var res = await c.GetStringAsync(link);
              TaskAPI task = new TaskAPI();
  
              task = JsonConvert.DeserializeObject&lt;TaskAPI&gt;(res);
  
              return Ok(task);
  </code></pre>
  
  <p>Basically, I am just trying to convert the property names, so that I can use typescript models in my frontend Angular side</p>