Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery equivalent for JSON.stringify [duplicate]

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()?

like image 923
Highmastdon Avatar asked Jun 20 '12 11:06

Highmastdon


1 Answers

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

like image 60
Mariusz Jamro Avatar answered Sep 22 '22 16:09

Mariusz Jamro