I want to use JSON.stringify() to convert my JS object to a json string. But when I use richfaces components in the web page, I got the wrong result. See the example below. Please help me. Thank you! this is the codes:
function testJSON()
{
var selArray = new Array();
selArray.push("aaa");
selArray.push("bbb");
selArray.push("ccc");
alert(JSON.stringify(selArray));
}
I got this if there is no richfaces components in the page.
["aaa","bbb","ccc"]
And if there is any richfaces component like "rich:modalpanel" in the page, it will get the following wrong JSON string.
"[\"aaa\",\"bbb\",\"ccc\"]"
I think that's because richfaces has done songthing that affected JSON.
So what can I do to avoid the effect of richfaces ?
Thank you very much!