摘要: this is an easy implementation of "tuple to JSON"并不是所有的东西都能转换为一个JSON字符串。例如,方法就不能转换为JSON,不过所有的基本类型,比如数字、字符串和数组都可以转换。下面创建一个对象,然后把它转换为一个串。 1 function Movie(title, genre, rating, showtimes) { 2 this.title = title; 3 this.genre = genre; 4 this.rating = rating; 5 this.showtimes = showtimes... 阅读全文
posted @ 2013-05-29 02:18 spaceship9 阅读(511) 评论(0) 推荐(0) 编辑