js Tutorial Series 21: javascript-JSON

What is JSON JavaScript Object Notation (JavaScript Object Notation) A subset of JavaScript The difference between JSON and object literals JSON properties must be enclosed in double quotes, object literals can be omitted var o = {}; object literal {} JSON

2 json code introduction:

   {
            "name" : "zs",
            "age" : 18,
            "sex" : true,
            "sayHi" : function() {
                console.log(this.name);
            }
        };

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324883303&siteId=291194637