JonathansCorner.com Report post Posted April 1, 2011 (edited) I am trying to convert XML to JSON for populating a graph. My working XML is: <chart caption="Volume 2010 vs. 2011" xAxisName="Month" yAxisName="USD" showValues="0" numberPrefix="{:content:}quot;> <categories> <category label="Current" /> <category label="February" /> <category label="January" /> <category label="December" /> <category label="November" /> <category label="October" /> </categories> <dataset seriesName="2010" color="4060af"> <set value="1" /> <set value="2" /> <set value="1" /> <set value="2" /> <set value="1" /> <set value="2" /> </dataset> <dataset seriesName="2011" color="622567"> <set value="3" /> <set value="4" /> <set value="3" /> <set value="4" /> <set value="3" /> <set value="4" /> </dataset> </chart> The present JSON results in "Invalid data" being displayed. Going off of http://www.fusioncha...ry.asp?Column3D I have: { "chart": { "palette": "5", "caption": "Volume 2010 vs. 2011", "xaxisname": "Month", "yaxisname": "USD", "numberprefix": "{:content:}quot;, "rotatevalues": "1", "placevaluesinside": "1", "forceyaxisvaluedecimals": "1", "yaxisvaluedecimals": "2", "showvalues": "0", },[{[{ "label": "October", },{ "label": "November", },{ "label": "December", },{ "label": "January", },{ "label": "February", },{ "label": "Current", },] },][{ "seriesname": "2010", "color": "4060af", "showvalues": "0",[{ "value": "1", },{ "value": "2", },{ "value": "1", },{ "value": "2", },{ "value": "1", },{ "value": "2", },] },{ "seriesname": "2011", "color": "622567", "showvalues": "0",[{ "value": "3", },{ "value": "4", },{ "value": "3", },{ "value": "4", },{ "value": "3", },{ "value": "4", },] },] } What is wrong with this JSON? Thanks, Jonathan Edited April 1, 2011 by JonathansCorner.com Share this post Link to post Share on other sites
Guest Angie Report post Posted April 1, 2011 Hi, Welcome to FusionCharts Forum! Please try the modified JSON code below: { "chart": { "caption": "Volume 2010 vs. 2011", "xaxisname": "Month", "yaxisname": "USD", "showvalues": "0", "numberprefix": "$" }, "categories": [ { "category": [ { "label": "Current" }, { "label": "February" }, { "label": "January" }, { "label": "December" }, { "label": "November" }, { "label": "October" } ] } ], "dataset": [ { "seriesname": "2010", "color": "4060af", "data": [ { "value": "1" }, { "value": "2" }, { "value": "1" }, { "value": "2" }, { "value": "1" }, { "value": "2" } ] }, { "seriesname": "2011", "color": "622567", "data": [ { "value": "3" }, { "value": "4" }, { "value": "3" }, { "value": "4" }, { "value": "3" }, { "value": "4" } ] } ] Hope this helps. Share this post Link to post Share on other sites
JonathansCorner.com Report post Posted April 1, 2011 P.S. In the original file, a "quote, dollar sign, quote" was munged to "{:content:}quot;". Jonathan Share this post Link to post Share on other sites
Guest Angie Report post Posted April 1, 2011 Hi, We are glad to know that you have managed to solve your problem. Keep FusionCharting! Share this post Link to post Share on other sites
JonathansCorner.com Report post Posted April 1, 2011 CLARIFICATION: I haven't solved my problem. The forum munged my posted code and I was trying to explain what the original version was. My problem is unsolved now. Hi, We are glad to know that you have managed to solve your problem. Keep FusionCharting! Share this post Link to post Share on other sites