I am a newbie and I am trying to create a valid json object, so the default jsonreader will be able to read it. The c# code I have is the following:
var gridData = new ViewDataDictionary();
var gridRows = new ViewDataDictionary[1];
gridRows[0] = new ViewDataDictionary();
gridRows[0][“id”] = 2;
gridRows[0][“cell”] = new object[]
{
2, “2009-03-23”, “Test Client”, 34.65, 5.34, 39.99,
“These are test notes which can be very long.”
};
gridData[“page”] = 1;
gridData[“total”] = 1;
gridData[“records”] = 1;
gridData[“rows”] = gridRows;
It spits this out, which is obviously not seem correct as the data is not loaded in the grid:
[{“Key”:”page”,”Value”:1},{“Key”:”total”,”Value”:1},{“Key”:”records”,”Value”:1},{“Key”:”rows”,”Value”
:[[{“Key”:”id”,”Value”:2},{“Key”:”cell”,”Value”:[2,”2009-03-23″,”Test Client”,34.65,5.34,39.99,”These
are test notes which can be very long.”]}]]}]
I am not sure what type of objects to use on the server side to create the json object.
thanx
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top