title: Deserialize an Object from JSON API - Unexpected character encountered while parsing value: {. Path '[0].produced_weight', line 1, position 295
body: <p>Im retrieving JSON format data from an API URL like:
  <code>https://example.help/api/a?start_date=2022-09-01&amp;end_date=2022-09-13&amp;apikey=123</code>
  And i'm using to get the data:</p>
  <pre><code>public string Get(string url, string json, Contexto oContexto)
      {
          try
          {
  
              var client = new RestClient(url);
              var request = new RestRequest(Method.GET);
              IRestResponse response = client.Execute(request);
              return response.Content;
          }
          catch (Exception oExcepcion)
          {
              ErrorControl oErrorControl = new ErrorControl();
              oErrorControl.RecordErrorLog(System.Reflection.MethodBase.GetCurrentMethod().Name, oContexto.Request, oContexto.UserIdentity, oExcepcion);
              return string.Empty;
          }
      }
  </code></pre>
  <p>And  when im trying to deserialize the data with</p>
  <pre><code>oListTransparency = JsonConvert.DeserializeObject&lt;List&lt;ReportTransparency&gt;&gt;(datos);
  </code></pre>
  <p>I'm getting this error
  <code>Unexpected character encountered while parsing value: {. Path '[0].produced_weight', line 1, position 295.</code>
  The variable datos is an String with the text format of the JSON</p>
  <p>The JSON looks like this:</p>
  <pre><code>[{&quot;ico_id&quot;:&quot;03-0178-905-22-H&quot;,&quot;ico_status&quot;:&quot;approved_qa&quot;,&quot;country&quot;:&quot;COL&quot;,&quot;contract_id&quot;:&quot;C-1546&quot;,&quot;contract_type&quot;:&quot;differential&quot;,&quot;quality&quot;:&quot;RTB&quot;,&quot;grade&quot;:600,&quot;certification&quot;:null,&quot;customer_name&quot;:&quot;LA COLOMBE TORREFACTION&quot;,&quot;mark&quot;:&quot;Huila&quot;,&quot;units&quot;:205,&quot;production_number&quot;:&quot;OTT-1804&quot;,&quot;produced_weight&quot;:{&quot;value&quot;:&quot;950.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;approval_date&quot;:&quot;2022-09-03&quot;,&quot;dry_parchment_costs&quot;:{&quot;per_kg&quot;:&quot;13511.92&quot;,&quot;total_kg&quot;:&quot;12836324.0&quot;,&quot;per_carga&quot;:&quot;1688990.0&quot;,&quot;currency&quot;:&quot;COP&quot;},&quot;average_purchase_price&quot;:{&quot;value&quot;:&quot;21364.2&quot;,&quot;currency&quot;:&quot;COP&quot;},&quot;assigned_coffees&quot;:[{&quot;lotset_id&quot;:&quot;COL-SET-3398&quot;,&quot;lotset_local_id&quot;:&quot;PAI-SET-117&quot;,&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;2982.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;lots&quot;:[{&quot;lot_id&quot;:&quot;PAI-LOT-518&quot;,&quot;lot_main_id&quot;:&quot;COL-LOT-17437&quot;,&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;172.03&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;producer_name&quot;:&quot;JOSE LOPEZ&quot;,&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;513.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}},{&quot;lot_id&quot;:&quot;PAI-LOT-556&quot;,&quot;lot_main_id&quot;:&quot;COL-LOT-17964&quot;,&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;207.58&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;producer_name&quot;:&quot;EDINSON CHAVARRO&quot;,&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;619.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}},{&quot;lot_id&quot;:&quot;PAI-LOT-525&quot;,&quot;lot_main_id&quot;:&quot;COL-LOT-17659&quot;,&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;40.58&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;producer_name&quot;:&quot;OLIVER CABRERA&quot;,&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;121.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}},{&quot;lot_id&quot;:&quot;PAI-LOT-546&quot;,&quot;lot_main_id&quot;:&quot;COL-LOT-17900&quot;,&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;75.12&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;producer_name&quot;:&quot;CESAR CARDOSO&quot;,&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;224.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}},{&quot;lot_id&quot;:&quot;PAI-LOT-555&quot;,&quot;lot_main_id&quot;:&quot;COL-LOT-17963&quot;,&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;252.85&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;producer_name&quot;:&quot;EDINSON CHAVARRO&quot;,&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;754.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}},{&quot;lot_id&quot;:&quot;PAI-LOT-552&quot;,&quot;lot_main_id&quot;:&quot;COL-LOT-17958&quot;,&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;251.84&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;producer_name&quot;:&quot;EDINSON CHAVARRO&quot;,&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;751.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}}],&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;1000.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}},{&quot;lot_id&quot;:&quot;POP-LOT-85&quot;,&quot;producer_name&quot;:&quot;JOSE CANO&quot;,&quot;purchase_price&quot;:{&quot;value&quot;:&quot;21364.2&quot;,&quot;currency&quot;:&quot;COP&quot;},&quot;purchase_weight&quot;:{&quot;value&quot;:&quot;268.0&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;},&quot;assigned_weight&quot;:{&quot;value&quot;:&quot;266.2&quot;,&quot;unit_of_measurement&quot;:&quot;kg&quot;}}],&quot;exchange_rate&quot;:{&quot;value&quot;:&quot;4480.5&quot;,&quot;target_currency&quot;:&quot;COP&quot;},&quot;additional_greens&quot;:[]}]
  </code></pre>
  <p>The class fr the ReportTransparency</p>
  <pre><code>public class ReportTransparency
  {
      public string ico_id { get; set; }
      public string ico_status { get; set; }
      public string country { get; set; }
      public string contract_id { get; set; }
      public string contract_type { get; set; }
      public string quality { get; set; }
      public int grade { get; set; }
      public string certification { get; set; }
      public string customer_name { get; set; }
      public string mark { get; set; }
      public int units { get; set; }
      public string produced_weight { get; set; }
      public string unit_of_measurement { get; set; }
      public string approval_date { get; set; }
      public ReportDryParchmentCosts dry_parchment_costs { get; set; }
      public List&lt;ReportAssignedCoffee&gt; assigned_coffees { get; set; }
      public List&lt;ReportAdditionalGreen&gt; additional_greens { get; set; }
      
      //NEW
      public string production_number { get; set; }
      public ReportAveragePurchasePrice average_purchase_price { get; set; }
      public ReportExchangeRate exchange_rate { get; set; }
  
  }
  </code></pre>
  <p>And the others</p>
  <pre><code>public class ReportAssignedCoffee
  {
      public string lot_id { get; set; }
      public string producer_name { get; set; }
      public string assigned_weight { get; set; }
      public string unit_of_measurement { get; set; }
      public string lotset_id { get; set; }
      public string lotset_local_id { get; set; }
      public string milling_output_id { get; set; }
      public List&lt;ReportTransparency_Lot&gt; lots { get; set; }
      //NEW
      public ReportAveragePurchasePrice purchase_price { get; set; }
      public ReportPurchaseWeight purchase_weight { get; set; }
  }
  </code></pre>
  <p>And in that way with all the subclasses
  Thank you!!</p>