Version 1.0
Quickly convert JavaScript objects to JSON strings and back to objects.
Encode
var obj = {};
obj.name = "Test JSON";
obj.type = "test";
$.json.encode(obj); //output: {"name":"Test JSON", "type":"test"}Decode
$.json.decode({"name":"Test JSON", "type":"test"}); //output: objectDownload it here.
7 comments:
I think I maybe missing something. Whenever I try to run this I get
"text/replace is not a function" on line 100.
Any ideas?
Can you post (or email me) an example of what you are trying to do?
Thanks
-G
The problem seems to have cleared up. I discovered I was having some library conflicts. Once I resolved the conflicts, this problem went away.
Thanks for a great plugin!
This is exactly what I was looking for -- excellent. I'm using 'serialize' to pretty print my json objects. It would be great to add line breaks and such so I can print to a web site.
Great plugin Giraldo!
Thanks pal!
To increase your popularity, I suggest you to add (or ask us) what version of jquery are tested (e.g. 1.0.x, 1.2.x, 1.3.1).
For example, even the version 1.3.2 is released, I cannot upgrade due to possible incompatibilities of the plugins.
Regards
This doesn't seem to work with UTF-8 strings. I have problems encoding and decoding Greek characters.
you save my life dude !!
great thanks
Post a Comment