jQuery类似于JSON.stringify

Hig*_*don 67 javascript jquery json

可能重复:
在jQuery中序列化为JSON

我在我的javascript代码中使用jquery作为库.但有时我必须这样做JSON.stringify().

当我想保持我的代码IE兼容时,我会用
$("head").append('<script type="text/javascript" src="../Includes/json2.js"></script>');
JSON.stringify()的工作.是不是有等价jqueryJSON.stringify()

Mar*_*mro 67

jQuery中没有这样的功能.使用JSON.stringify或替代任何具有类似功能的jQuery插件(例如jquery-json).

  • 像https://raw.github.com/gist/754454/c6401b8cc461f84799503484a0c780a7622b164d/jQuery.stringify.js (2认同)