当前位置:网站首页>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 },
]
边栏推荐
- 做亚马逊测评要了解的知识点有哪些?
- Sign for this "plug-in" before returning home for the new year
- Moteur de modèle de moteur thymeleaf
- NDK learning notes (I)
- Reading the registry using batch
- [usual practice] explore the insertion position
- 使用Genymotion Scrapy控制手机
- NDK learning notes (IV) functions, classes and exceptions of swig
- Metabase源码二次开发之Clojure 安装
- View controller and navigation mode
猜你喜欢

Control your phone with genymotion scratch

Thymeleafengine template engine

What should the cross-border e-commerce evaluation team do?

NDK R21 compiles ffmpeg 4.2.2 (x86, x86_64, armv7, armv8)

Detailed steps for installing mysql-5.6.16 64 bit green version

亚马逊、速卖通、Lazada、虾皮平台在用911+VM的环境可以进行产号、养号、补单等操作吗?
![[must see for game development] 3-step configuration p4ignore + wonderful Q & A analysis (reprinted from user articles)](/img/4c/42933ac0fde18798ed74a23279c826.jpg)
[must see for game development] 3-step configuration p4ignore + wonderful Q & A analysis (reprinted from user articles)

SQLI_ LIBS range construction and 1-10get injection practice

NFC Development -- difference between ID card and IC card (M1 card and CPU card) (III)

Sqli-libs range 23-24 filtration and secondary injection practice
随机推荐
Configure the rust compilation environment
Fix [no Internet, security] problem
View controller and navigation mode
Servlet
When the recyclerview plays more videos, the problem of refreshing the current video is solved.
The artistic director and production designer of Disney's Mandalorian revealed the virtual scene production behind it
How to use the markdown editor
Deployment of Flink
Do we really need conference headphones?
Growth Diary 01
[must see for game development] 3-step configuration p4ignore + wonderful Q & A analysis (reprinted from user articles)
做亚马逊测评要了解的知识点有哪些?
OJDBC在Linux系统下Connection速度慢解决方案
What do you need to know about Amazon evaluation?
SQLI_ LIBS range construction and 1-10get injection practice
NDK learning notes (VIII) thread related
我们真的需要会议耳机吗?
11. Gesture recognition
Cenos7 builds redis-3.2.9 and integrates jedis
Super details to teach you how to use Jenkins to realize automatic jar package deployment