我的服務器返回一個有效的JSON字符串(JSONP)。將JSON字符串傳遞給javascript函數
例如parseJSON ({"NAME":"Tom"});
在客戶端我有這個功能實現
function parseJSON (myOBJ) {
//myOBJ is already a JSON object but I wanted to it to be a JSON string
// so that I can check
// if browser supports JSON.parse otherwise do eval on that string.
}
https://github.com/douglascrockford/JSON-js/blob/master/json2.js – ThiefMaster 2012-03-20 06:39:28