Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Does json mean javascript?

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "json refers to javascript", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "json refers to javascript" this article.

Json is not javascript;json is a lightweight data exchange format, while javascript is a lightweight, interpretive or just-in-time programming language with function priority; json format is evolved from JavaScript objects, it is a subset of JavaScript.

This article operating environment: windows7 system, javascript1.8.5 version, Dell G3 computer.

Is json javascript?

Json is not javascript.

JSON (JavaScript Object Notation) is a lightweight data exchange format, JSON format data, mainly for cross-platform exchange of data. JavaScript (JS for short) is a lightweight, interpretive or just-in-time programming language with function priority.

But JSON does have a relationship with JavaScript, and it can be said that this data format evolved from the JavaScript object, which is a subset of JavaScript. JSON itself means JavaScript object representation (JavaScript Object Notation), which uses strict JavaScript object representation to represent structured data.

It is a strict js object format. The attribute name of JSON must have double quotation marks. If the value is a string, it must also be double quotation marks.

JSON is only a kind of data format (or data form), data format is actually a kind of specification, format, form, specification can not be used to store data. We cannot call the following objects JSON, such as:

Var obj2= {}; / / this is just the JS object var obj3= {width:100,height:200}; / * this has nothing to do with JSON, but the object of JS * / var obj4= {'width':100,'height':200}; / * it has nothing to do with JSON, but the object of JS * / var obj5= {"width": 100,200 "height": 200," name ":" rose "} / * We can call this a JavaScript object in JSON format * / var str1=' {"width": 100,200 "height", "name": "rose"}' / * We can call this a string in JSON format * / var a = [{"width": 100,200, "name": "rose"}, {"width": 100,200, "height": 200," name ":" rose "}, {" width ": 100,200," height ": 200," name ":" rose "},] / * this array is called JSON format Is a slightly more complex form of JSON * / var str2=' ['+'{"width": 100," height ": 200," name": "rose"},'+'{"width": 100,200, "name": "rose"},'+'{"width": 100,200, "height": 200, "name": "rose"},'+']' / * this is called a slightly more complex string in JSON format * /

The above is all the contents of the article "does json refer to javascript". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report