FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:http://morewally.com/cs/blogs/wallym/rss.aspx
JSON - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on .NET, Sql, ASP.NET, and other crazy shenanigans

News

Personal Blog

Work Blog

.NET

Book Authors

Business

Family

Friends

Georgia Tech Bloggers

Personal

JSON

If you want to safely parse and transmit JSON, you need to use a JSON parser to transfer a text into a Javascript object.  To go the other way from a Javascript object to a JSON string you will need to use a JSON stringifier.  Be careful on using cyclic data structures, JSON stringifiers don't like them.
Posted: Nov 22 2005, 02:23 PM by Wallym | with 3 comment(s)
Filed under:

Comments

walkingby said:

In Mozilla bowsers you use myobject.toSource() to get the javascript serialization of the object

var person = {name:'me',age:10};
var myjson = person.toSource();
# November 22, 2005 3:37 PM

Scott Cate - Knowledge Base Software said:

Wally, what JSON stringifiers are you using?
# November 22, 2005 6:25 PM

Charles Chen said:

Douglas Crockford (the father of JSON?) has a great little utility function to "stringify" JSON objects.

More info on Crockford and JSON here: http://www.crockford.com/JSON/index.html

JSON utility here:
http://www.crockford.com/JSON/json.js

Linked off of this page:
http://www.crockford.com/JSON/js.html
# November 22, 2005 9:51 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)