Skip to content

Data Interchange Format

0x6C77 edited this page Mar 11, 2013 · 8 revisions

XML vs JSON

  • 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.

JSON and Python

http://docs.python.org/2/library/json.html

JSON Translations

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

Clone this wiki locally