title: Convert JSON File to C# Object
body: <p>I need some help with converting JSON file to C# object. I've been using Json.NET library. JSON file format are as below:</p>
  
  <pre><code>{"174.845620 -36.913447 WGS84":[{"uuid":"a7e72b5c1fb96f1452d3c64fe89c7e6a","name":"35 Carbine Road","suburb":"Mount Wellington","town":"Auckland","district":"Auckland City","region":"Auckland","island":"North Island","x":2674839,"y":6474828,"longitude":174.845707,"latitude":-36.913385,"locality":"Mount Wellington, Auckland, Auckland City"}],"174.698503 -36.788258 WGS84":[{"uuid":"96fb8ae43b6791f5f2b7006d8818b9ad","name":"1\/248 Beach Haven Road","suburb":"Birkdale","town":"North Shore","district":"North Shore City","region":"Auckland","island":"North Island","x":2661988,"y":6488992,"longitude":174.698375,"latitude":-36.78816,"locality":"Birkdale, North Shore, North Shore City"}]}
  </code></pre>
  
  <p>I've created the following classes like this to map the JSON:</p>
  
  <pre><code> public class WGS84Coordinate
  {
      public string uuid{get; set;}
      public string name{ get; set;}
      public string suburb { get; set;}
      public string town { get; set;}
      public string district { get; set;}
      public string region { get; set;}
      public string island { get; set;}
      public int x { get; set;}
      public int y { get; set;}
      public double longitude { get; set;}
      public double latitude { get; set;}
      public string locality { get; set;}
  }
  
      public class WGS84Coordinates
  {
      public WGS84Coordinate wgs84Coodinate{ get; set;} 
  }
  </code></pre>
  
  <p>and I have the following code to deserialize the JSON:</p>
  
  <pre><code>   List&lt;WGS84Coordinates&gt; r = JsonConvert.DeserializeObject&lt;List&lt;WGS84Coordinates&gt;&gt;(json);
                      if (r.Count &gt; 0)
                      {
                          json = r[0].wgs84Coodinate.uuid + r[0].wgs84Coodinate.suburb;
                      }
  </code></pre>
  
  <p>The code doesn't seem to be working. Do I miss anything? Please do help.
  Many thanks.
  Chris</p>
  
  <p>Edited 
  btw, I've tried the following by using Dictionary and still not good. ERROR: "Cannot deserialize JSON array into type 'JSONConvertTester.WGS84Coordinate'."</p>
  
  <pre><code>    Dictionary&lt;string, WGS84Coordinate&gt; r = JsonConvert.DeserializeObject&lt;Dictionary&lt;string, WGS84Coordinate&gt;&gt;(json); // deserialize
      foreach (KeyValuePair&lt;string, WGS84Coordinate&gt; o in r)
      {
          json = o.Value.uuid;
      }
  </code></pre>
  
  <p>Please anyone kindly advise, Many thanks.</p>