- Web Penetration Testing with Kali Linux(Third Edition)
- Gilberto Najera Gutierrez Juned Ahmed Ansari
- 104字
- 2021-06-24 18:44:55
XML and JSON
Both XML and JSON are used by web services to represent structured sets of data or objects.
As discussed in previous sections, XML uses a syntax based on tags and properties, and values for those tags; for example, the File menu of an application, can be represented as follows:
<menu id="m_file" value="File"> <popup> <item value="New" onclick="CreateDocument()" /> <item value="Open" onclick="OpenDocument()" /> <item value="Close" onclick="CloseDocument()" /> </popup> </menu>
JSON, on the contrary, uses a more economic syntax resembling that of C and Java programming languages. The same menu in JSON format will be as follows:
{"menu": { "id": "m_file", "value": "File", "popup": { "item": [ {"value": "New", "onclick": "NewDocument()"}, {"value": "Open", "onclick": "OpenDocument()"}, {"value": "Close", "onclick": "CloseDocument()"} ] } }}
推薦閱讀
- Windows Server 2019 Cookbook
- 構(gòu)建高可用Linux服務(wù)器(第4版)
- 突破平面3ds Max動畫設(shè)計與制作
- 計算機系統(tǒng):基于x86+Linux平臺
- 計算機系統(tǒng)的自主設(shè)計
- OpenSolaris設(shè)備驅(qū)動原理與開發(fā)
- 從實踐中學(xué)習(xí)Windows滲透測試
- 嵌入式微系統(tǒng)
- Linux內(nèi)核分析及應(yīng)用
- Linux系統(tǒng)安全:縱深防御、安全掃描與入侵檢測
- Getting Started with UDK
- Implementing Domain-Specific Languages with Xtext and Xtend(Second Edition)
- 電腦辦公(Windows 7 + Office 2013)入門與提高
- Mastering AWS CloudFormation
- Docker for Developers