title: how to read json array in wcf rest service
body: <p>I am using wcf rest service to get data from android app,I am getting json array from android app but when i am reading data it getting array count 0 , throwing error :Unexpected character encountered while parsing value: R. Path '', line 0, position 0. And android app getting response error is : server encountered an error processing the request. See server logs for more details.</p>
  
  <p>this is my rest service:</p>
  
  <pre><code>[OperationContract]
          [WebInvoke(Method = "POST", UriTemplate = "finalProductList", RequestFormat = WebMessageFormat.Json,
              BodyStyle = WebMessageBodyStyle.Bare)]
          string finalProductList(Productdetails[] objprod);
  
  public string finalProductList(Productdetails[]  objprod)
          {
  
                  BasicConfigurator.Configure();
                  log.Info("finalProductList method fired ");
  
                  log.Info(objprod.Length);
                  log.Info(objprod);
                  StringBuilder sb = new StringBuilder();
                  sb.Append("\"jsonResult\":[");
                  int result = 0;
                  string json = objprod.ToString();
                  log.Info(json);
                  JObject rss = JObject.Parse(json);
                  log.Info(rss);
                  JArray items = (JArray)rss["finalProductList"];
  }
  </code></pre>
  
  <p>I tried with object[] array and List also getting same count 0 and null.</p>
  
  <p>This is json response:</p>
  
  <pre><code>{
         "objprod": [{
                 "username": "Surendra",
                 "product_id": "10044",
                 "product_mrp": "35.00",
                 "prd_entertotalqnty": "77.4",
                 "product_name": "DOUBLE TONED MILK (HNB) SACHET 200 ML",
                 "prd_remnfreeqnty": "44.75",
                 "merchantId": "160000",
                 "prd_Total": "775.25",
                 "prd_enterfreeqnty": "55.25",
                 "prd_enterqnty": "22.15",
                 "prd_avlfreeqnty": "100",
                 "count_id": "1",
                 "merchantname": "ABCD MILK"
         }, {
                 "username": "Surendra",
                 "product_id": "10011",
                 "product_mrp": "20.00",
                 "prd_entertotalqnty": "5.5",
                 "product_name": "FCM SACHET 500 ML",
                 "prd_remnfreeqnty": "4",
                 "merchantId": "160000",
                 "prd_Total": "70",
                 "prd_enterfreeqnty": "2",
                 "prd_enterqnty": "3.5",
                 "prd_avlfreeqnty": "6",
                 "count_id": "2",
                 "merchantname": "ABCD MILK"
         }]
  } 
  </code></pre>
  
  <p>This my class:</p>
  
  <p>[DataContract]
      public class Productdetails
      {
          [DataMember]
          public int merchant_id { get; set; } </p>
  
  <pre><code>    [DataMember]
      public int merchant_name { get; set; } 
  
      [DataMember]
      public decimal prd_entertotalqnty { get; set; } 
  
      [DataMember]
      public int product_id { get; set; } 
  
      [DataMember]
      public string product_name { get; set; } 
  
      [DataMember]
      public decimal prd_remnfreeqnty { get; set; } 
  
      [DataMember]
      public decimal prd_enterfreeqnty { get; set; } 
  
      [DataMember]
      public decimal prd_enterqnty { get; set; } 
  
      [DataMember]
      public decimal prd_avlfreeqnty { get; set; } 
  
      [DataMember]
      public decimal product_mrp { get; set; } 
  
      [DataMember]
      public decimal prd_Total { get; set; } 
  
      [DataMember]
      public int count_id { get; set; } 
  
  }
  </code></pre>
  
  <p>what i done mistake here..1</p>