I want to receive a json object like this:
"datasets": [{
"label": "# of Votes",
"data": [20, 10, 3],
"backgroundColor": [
"#ccf9d6",
"#ccf9d6",
"#ccf9d6"
],
"borderWidth": 1
}]
but before Serialization I have to create object and I dont know how it should look in object in code behind. I have something like this but it's wrong.
datasets = new ChartDatasets[4]
{
label = "# of Votes",
data = new int[3] { 20, 10, 3 },
backgroundColor = new string[3] { "#ccf9d6", "#ccf9d6", "#ccf9d6" },
borderWidth = 1
}
Can someone help me?