This is the sample JSON which I receive from a service, and I am unable to deserialize it using C#.
{
"columns": [
"empid",
"employeename",
"currentAllocation",
"Dept head",
"Manager",
"department",
"duration_s",
"count"
],
"data": [
[
1,
"Jane Doe",
"Production",
11,
"John Doe",
"Quality",
26638.0,
{
"columns": [
"start_timestamp",
"duration_s"
],
"data": [
[
1588351656.54799,
450.0
],
[
1588421798.54799,
1438.0
],
[
1589875223.54799,
597.0
]
]
}
],
[
1,
"Jane Doe",
"Production",
45,
"Peter Pan",
"Logistics",
33379.0,
{
"columns": [
"start_timestamp",
"duration_s"
],
"data": [
[
1588351656.54799,
450.0
],
[
1588421798.54799,
1438.0
],
[
1589875223.54799,
597.0
]
]
}
]
]
}
I am having a problem defining the target object. Particularly, I am unable to decide the structure/format of the data
node. It looks like it should be a List<List<Tuple<string,string,string,string,string,string,Encounter>>>
where Encounter
is class with two properties:
public class Encounter
{
public List<string> column
public List<Tuple<string,string>> data
}
Can someone kindly suggest a solution?
>` and `List
– Lasse V. Karlsen Jul 27 '20 at 09:20>`, which you're still going to have to pick apart manually.
>> Where encounter is class with two properties public class Encounter { public list} column public list> data }
– Anupam Dutta Jul 27 '20 at 17:53