JSON.stringify()でオブジェクトをjsonの文字列に変換

サンプル
var str = JSON.stringify({key1: “tokyo", key2: “yokohama",key3: “kawasaki"});
document.writeln(str);

実行結果
{“key1″:"tokyo","key2″:"yokohama","key3″:"kawasaki"}

JavaScript

Posted by arkgame