scientific_comp_projects/CODE/[python]XML_JSON/intro.md

49 lines
1.6 KiB
Markdown
Raw Normal View History

2021-10-29 15:16:40 +02:00
## General intro
### XML :
Extensible Markup Language and related technologies.
Similar to HTML with some changes to better suit general data
Rich and expressive but more complex than JSON.
### JSON :
Javascript object notation.
Very concise format for serializing object data
Derived from JavaScript but supported by most modern languages
Compact and easy to read, write, and process.
## Specific info.
### XML :
Similar to structure to HTML but more strict.
Usually used for complex, document-like data.
Must always have a single root tag.
Can contain optional document declaraton
Empty tags must have a closing slash <tag/>
Attributes must have values that are enclosed in quotes.
Tags must be properly nested within each other.
Tags and attributes starting with "xml" are reserved.
### JSON :
Lightweight, text-based format for data interchange
Easy for humans to read and machines to use.
Derived from JavaScript, but language independent.
- Number : Signed decimal number, no Integrer/Float distinction
- String : Unicode or escaped characters inside double quotes.
- Boolean : True or false value
- Null : Null value
- Array : List of ordered values
- Object : Collection of key-value pairs, keys are strings
### Sending data to web services
HTTP Operation | Purpose
GET | Retrive data from a web service
POST | Create or update data on a web service
PUT | Create or update specific data resource on a web service
PATCH | Perform a partial data update or edit on a web service
DELETE | Delete data on a web service