title: how to parse json list at c#
body: <p>How to parse this json list at c# ? I have read this list at my service side.I using web api .</p>
  
  <pre><code>[
  { "Id":1,
    "Adjustment":{
      "CardNumber": "1234567895678",
      "TimeStamp": "2016-06-14 12:00:56",
      "Point": -13.09
      }
  },
  { "Id":2,
    "Adjustment":{
      "CardNumber": "2345673245689",
      "TimeStamp": "2016-06-14 12:05:43",
      "Point": 2.3
      }
  }
  ] 
  </code></pre>
  
  <p>I done this way but it is not working :How can I fixed my code? Do you have any suggestions ?I sent to request body with Fiddler.</p>
  
  <pre><code>public object InsertNewCustomer([FromBody] object value)
  {
      var returns = new List&lt;object&gt;();
  
      if (value == null)
      {
          returns.Add(new { ReturnCode = "-1" });
  
          return Json(returns, JsonRequestBehavior.AllowGet).Data;
      }
      var jsonstr = @value.ToString();
  
      var jsonVal = JArray.Parse(jsonstr);
  
  
  
      Cariler newcustomer = new Cariler();
  
      using (TransactionScope scope = new TransactionScope())
      {
  
          foreach (JObject root in jsonVal)
          {
              foreach (KeyValuePair&lt;String, JToken&gt; app in root)
              {
  
                  var card = (String)app.Value["CardNumber"];
                  var time = (String)app.Value["TimeStamp"];
                  var point = (byte)app.Value["Point"];
  
                  newcustomer.CardNum = card;
                  newcustomer.Time = time;
                  newcustomer.Point = point;
                  context.Cariler.Add(newcustomer);
                  context.SaveChanges();
              }
          }
  
  
          scope.Complete();
          returns.Add(new { ReturnCode = "0" });
  
          return Json(returns, JsonRequestBehavior.AllowGet).Data;
      }
  }
  </code></pre>
  
  <p>Giving this error : </p>
  
  <blockquote>
    <p>{"Message":"An error has occurred.","ExceptionMessage":"Cannot access
    child value on
    Newtonsoft.Json.Linq.JValue.","ExceptionType":"System.InvalidOperationException","StackTrace":"
    at Newtonsoft.Json.Linq.JToken.get_Item(Object key)\r\n   at
    TestWebApi.Controllers.ValuesController.InsertNewCustomer(Object
    value) in
    c:\Users\sezer.erdogan.PROMAKS\Desktop\LYLWebApi\LYLWebApi\Controllers\ValuesController.cs:line
    64\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at
    System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.&lt;>c__DisplayClass10.b__9(Object
    instance, Object[] methodParameters)\r\n   at
    System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object
    instance, Object[] arguments)\r\n   at
    System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext
    controllerContext, IDictionary<code>2 arguments, CancellationToken
    cancellationToken)\r\n--- End of stack trace from previous location
    where exception was thrown ---\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter</code>1.GetResult()\r\n   at
    System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n---
    End of stack trace from previous location where exception was thrown
    ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter<code>1.GetResult()\r\n   at
    System.Web.Http.Controllers.ActionFilterResult.&lt;ExecuteAsync&gt;d__2.MoveNext()\r\n---
    End of stack trace from previous location where exception was thrown
    ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter</code>1.GetResult()\r\n   at
    System.Web.Http.Controllers.AuthenticationFilterResult.d__0.MoveNext()\r\n---
    End of stack trace from previous location where exception was thrown
    ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at
    System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"}</p>
  </blockquote>