Hey friends
I would like to know what is the exact structural pattern to be maintained if pass a JSON file instead of an XML file
for Example
This is my XML File(sample.xml);
<?xml version="1.0"?>
Category
*
0-1
2
px
Business/Services
1
1
1
Stock Trading
1
1
1
Job Search
1
1
1
Finance/Banking
1
1
1
Business
1
1
1
and i am passing it through the following code
gridbox = new dhtmlXGridObject(‘gridbox’);
gridbox.imgURL = “…/…/codebase/imgs/”;
gridbox.setSkin(“XP”);
gridbox.enableAutoHeight(true);
gridbox.enableAutoWidth(true);
gridbox.init();
gridbox.loadXML(“sample.xml”);
i would like to pass an json file instead of XML so how my JSON should be made corresponding to the provided sample.xml.
a) current version of JSON doesn’t support full grid configuration ( the head section in XML )
For other data it will look as
Business/Services
1
1
1
{ rows: [
{
id:“Business/Services”,
data:[“Business/Services”,“1”,“1”,“1”]
}
]}