jquery equivalent for JSON.stringify [duplicate]

2020-05-22 03:43发布

Possible Duplicate:
Serializing to JSON in jQuery

I'm using jquery as a library in my javascript code. But sometimes I have to JSON.stringify().

When I want to keep my code IE compatible I use
$("head").append('<script type="text/javascript" src="../Includes/json2.js"></script>');
to get my JSON.stringify() to work. Isn't there a equivalent in jquery for JSON.stringify()?

1条回答
家丑人穷心不美
2楼-- · 2020-05-22 04:33

There is no such functionality in jQuery. Use JSON.stringify or alternatively any jQuery plugin with similar functionality (e.g jquery-json).

查看更多
登录 后发表回答