title: Parsing a google directions json
body: <p>I am working with google directions Api...But I am facing problems for read the Json response...Does Someone know about this Api and can help me?
  I need get all route points to draw my polyline...which datas is important to get for it? How can I receive and parse it?</p>
  
  <p>This is a json as example</p>
  
  <p><a href="https://maps.googleapis.com/maps/api/directions/json?origin=-22.8895625,-47.0714089&amp;destination=-22.892376,-47.027553&amp;key=" rel="nofollow noreferrer">https://maps.googleapis.com/maps/api/directions/json?origin=-22.8895625,-47.0714089&amp;destination=-22.892376,-47.027553&amp;key=</a></p>
  
  <p>my code that doesn't work... </p>
  
  <pre><code> public static async Task&lt;List&lt;Model.Localizacao&gt;&gt; GetDirectionsAsync(Localizacao locUser, Localizacao locLoja)
      {
          using (var client = new HttpClient())
          {
              try
              {
                  List&lt;Model.Localizacao&gt; lstLoc = new List&lt;Model.Localizacao&gt;();
                  var json = await client.GetStringAsync("https://maps.googleapis.com/maps/api/directions/json?origin=" + locUser.latitude + "," + locUser.longitude + "&amp;destination="+ locLoja.latitude+","+locLoja.longitude+"&amp;key="+ GOOGLEMAPSKEY);
  
                  // json = json.Substring(json.IndexOf('['));
                  //  json = json.Substring(0, json.LastIndexOf(']') + 1);
                  lstLoc = JsonConvert.DeserializeObject&lt;List&lt;Model.Localizacao&gt;&gt;(json);
                  return lstLoc;
              }
              catch (Exception ex)
              {
                  Debug.WriteLine(ex.Message);
                  return null;
              }
          }
      }
  </code></pre>
  
  <p>I really need a help
  I have searched and the results hasn't helped me yet
  its a xamarin forms project
  Thank you</p>