title: Invalid JSON primitive:
body: <p>I am new to using API and getting response from them using asp.net I am making a call to an API in my asp.net web application like this:</p>
  
  <pre><code>  public ActionResult MakeCall() {
              CallTRunkAPIResponse response = GET("https://apibetaus.calltrunk.com/api/v2/GetAccountSummarySimple?access_token=mytokenkeyhere");
              return Content("Make a call");
          }
  </code></pre>
  
  <p>I have created a method to get response, transfer the response to json format and then convert to my object type using javascript serializer  like this:</p>
  
  <pre><code> public CallTRunkAPIResponse GET(string url)
          {
              HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  
          request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
          request.Headers.Add("X-Client:" + "header info from api here");
          request.Headers.Add("X-Authenticator-Session:" + "session key from api here");
  
          request.Method = "GET";
  
          request.ContentType = "application/json";
          try
          {
              WebResponse response = request.GetResponse();
  
              using (Stream responseStream = response.GetResponseStream())
              {
                  StreamReader reader = new StreamReader(responseStream, Encoding.UTF8);
                  //return reader.ReadToEnd();
  
                  JavaScriptSerializer js = new JavaScriptSerializer();
                  var objText = reader.ReadToEnd();
                  CallTRunkAPIResponse myojb = (CallTRunkAPIResponse)js.Deserialize(objText, typeof(CallTRunkAPIResponse));
                  return myojb;
              }
          }
          catch (WebException ex)
          {
              WebResponse errorResponse = ex.Response;
              using (Stream responseStream = errorResponse.GetResponseStream())
              {
                  StreamReader reader = new StreamReader(responseStream, Encoding.UTF8);
                  String errorText = reader.ReadToEnd();
  
                  // log errorText
              }
              throw;
          }
      }
  
  }
  </code></pre>
  
  <p>My object is like this (dont know for below response what properties should i have in this response class:</p>
  
  <pre><code> public class CallTRunkAPIResponse {
  
          public string Status { get; set; }
          public string Content { get; set; }
          public string Region { get; set; }
      }
  </code></pre>
  
  <p>response should be like this but I get error:</p>
  
  <pre><code>{
  "Status":"OK",
  "Content":{
  "Region":"beta.us",
  "CurrencyCode":"USD",
  "CurrencySymbol":"$",
  "Languages":["en"],
  "Version":{
  "Api":{
  "DisplayVersion":"2.0",
  "Version":3},
  "Client":{
  "ReportedVersion":0,
  "NewestVersion":2,
  "MinVersion":2}
  }
  }
  }
  </code></pre>
  
  <p>but I am getting this error:</p>
  
  <pre><code>System.ArgumentException: Invalid JSON primitive: .
  </code></pre>
  
  <p>at:</p>
  
  <pre><code> CallTRunkAPIResponse myojb = (CallTRunkAPIResponse)js.Deserialize(objText, typeof(CallTRunkAPIResponse));
  </code></pre>