So here is my problem, I have an API setup that returns results from Azure Storage Table in JSON string format :
[{
"CustID": "f3b6.....0768bec",
"Title": "Timesheet",
"CalendarID": "AAMkADE5ZDViNmIyLWU3N2.....pVolcdmAABY3IuJAAA=",
"PartitionKey": "Project",
"RowKey": "94a6.....29a4f34",
"Timestamp": "2018-09-02T11:24:57.1838388+03:00",
"ETag": "W/\"datetime'2018-09-02T08%3A24%3A57.1838388Z'\""
}, {
"CustID": "5479b.....176643c",
"Title": "Galaxy",
"CalendarID": "AAMkADE5Z.......boA_pVolcdmAABZ8biCAAA=",
"PartitionKey": "Project",
"RowKey": "f5cc....86a4b",
"Timestamp": "2018-09-03T13:02:27.642082+03:00",
"ETag": "W/\"datetime'2018-09-03T10%3A02%3A27.642082Z'\""
}]
And I am trying to convert it back to Project object :
public class Project : TableEntity
{
public Project() { }
public Project(string rKey, string pKey = "Project")
{
this.PartitionKey = pKey;
this.RowKey = rKey;
}
public Guid CustID { get; set; }
public string Title { get; set; }
public string CalendarID { get; set; }
}
I keep getting "Error converting value from 'string' to 'object'.
I have tried : this,this,this,this,this,this and this and it won't work. Always the same error. It's obvious I am missing something, but it has been two days and I can't seem to figure it out. Have tried modifying the object class to include all fields, tried adding another class that has list property, even tried passing it as Array.
At this point, I would be grateful of any kind of help.
>(json);`
– styx Sep 03 '18 at 11:36>(json); it gives me the same error. if instead i debug the string in the json variable and deserialize with return JsonConvert.DeserializeObject
– whitefrog0110 Sep 03 '18 at 14:10>("string here"); it works even if you dont tinker with Guid ^_^