this line is giving error. item.key and item.value
[{"TB79":"505","TB39":"505","TB35":"505","TB36":"505","TB37":"505","TB38":"505","TB32":"505","TB31":"505","TB34":"505","TB70":"505","TB33":"505"}]
this is sample data and i am unable to conver this data to xml format.
json = wc.DownloadString(SGDataUrl);
System.Collections.Generic.List<sgData> user = Newtonsoft.Json.JsonConvert.DeserializeObject<System.Collections.Generic.List<sgData>>(json);
foreach (var item in user)
{
cmd.Parameters.AddWithValue("@TimeBlock", item.key);
cmd.Parameters.AddWithValue("@SGData", item.Value);
}
public class sgData
{
public string TimeBlock { get; set; }
public decimal SGData { get; set; }
}