当前位置:网站首页>Review XML and JSON
Review XML and JSON
2022-06-11 06:02:00 【Not bald】
1.XML
XML No HTML substitute , Different design directions ,XML Designed to store and transmit data
XML Is an extensible markup language , The labels used must be customized , But have a root tag
And all XML All elements must have closing tags
for example
<note>
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<body>Don't forget the meeting!</body>
</note>
Medium note. In addition, when customizing labels , Labels cannot start with numbers and xml, The name cannot contain spaces .XML All elements can have text content and attributes , Attribute values should be placed in " " in ,XML Tags are case sensitive , Open and close tags must be written in the same case . stay XML in , Spaces will be reserved ,XML Nothing special . It's just plain text . Software with the ability to handle plain text can handle XML.
XML Special symbols in must use entity characters
for example 
XML The comments in <!-- -->
2.JSON
JSON And XML Similarity is used to store and transmit information , however JSON Than XML A smaller 、 Faster number of degrees 、 Easier to parse 、 No end tag 、 shorter 、 Faster reading and writing 、 Be able to use built-in JavaScript eval() Method 、 Using arrays 、 Do not use reserved words, etc
json Has the following characteristics :
The data is in the name / Value alignment “name” : “yyds”
Data is separated by commas [
{ key1 : value1-1 , key2:value1-2 },
{ key1 : value2-1 , key2:value2-2 },
{ key1 : value3-1 , key2:value3-2 },
…
{ key1 : valueN-1 , key2:valueN-2 },
]
Curly braces {} Save the object { “age”:18 }
brackets [] Save array , An array can contain multiple objects [
{ key1 : value1-1 , key2:value1-2 },
{ key1 : value2-1 , key2:value2-2 },
{ key1 : value3-1 , key2:value3-2 },
…
{ key1 : valueN-1 , key2:valueN-2 },
]
边栏推荐
- [IOS development interview] operating system learning notes
- 跨境电商测评自养号团队应该怎么做?
- NDK learning notes (VI) Basics: memory management, standard file i/o
- [daily exercises] merge two ordered arrays
- Informatica:数据质量管理六步法
- Altiumdesigner2020 import 3D body SolidWorks 3D model
- Servlet
- Twitter data collection (content, fans, keywords, etc.)
- [must see for game development] 3-step configuration p4ignore + wonderful Q & A analysis (reprinted from user articles)
- Warmly celebrate that yeyanxiu, senior consultant of Longzhi, won the title of "atlassian Certified Expert"
猜你喜欢

Wechat applet learning record

NDK learning notes (XI) POSIX sockect local communication

Can Amazon, express, lazada and shrimp skin platforms use the 911+vm environment to carry out production number, maintenance number, supplement order and other operations?

This is probably the most comprehensive project about Twitter information crawler search on the Chinese Internet

Installing and using sublist3r in Kali

Control your phone with genymotion scratch

SQLI_ LIBS range construction and 1-10get injection practice

Global case | how an airline with a history of 100 years can expand and transform to promote innovation in the aviation industry

What happened to the young man who loved to write code -- approaching the "Yao Guang young man" of Huawei cloud

Do you know the functions of getbit and setbit in redis?
随机推荐
How to use the markdown editor
YOLOv5的Tricks | 【Trick8】图片采样策略——按数据集各类别权重采样
Which company is better in JIRA organizational structure management?
Servlet
How to deal with message blackout and message sending failure of Aurora im
Invert an array with for
Cocoatouch framework and building application interface
数组部分方法
NDK learning notes (14) create an avi video player using avilib+window
[metadata]linkedin datahub
Qmake implementation of QT project Pro script to vs solution
NDK learning notes (I)
The artistic director and production designer of Disney's Mandalorian revealed the virtual scene production behind it
Using batch enumeration files
Sqli-libs range 23-24 filtration and secondary injection practice
我们真的需要会议耳机吗?
数据接入平台方案实现(游族网络)
Altiumdesigner2020 import 3D body SolidWorks 3D model
Implementation of data access platform scheme (Youzu network)
More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience