-
Notifications
You must be signed in to change notification settings - Fork 0
Data Interchange Format
0x6C77 edited this page Mar 11, 2013
·
8 revisions
- JSON is Java Script Object Notation
- XML is eXtensible Markup Language.
XML markup uses up more space than the actual payload. JSON has adressed this problem and while it's still a self-describing plain-text format, it's more space-efficient than anything XML-based could ever be.
http://docs.python.org/2/library/json.html
| JSON | Python |
|---|---|
| object | dict |
| array | list |
| string | unicode |
| number (int) | int, long |
| number (real) | float |
| true | True |
| false | False |
| null | None |
| Python | JSON |
|---|---|
| dict | object |
| list, tuple | array |
| str, unicode | string |
| int, long, float | number |
| True | true |
| False | false |
| None | null |