I am designing an API for my webapp.
I was thinking to support only JSON responses (not XML) because more streamlined.
But I have just bumped to this XML:
Could be compact in the JSON too, attribute is just the same as the value inside tag
from here:
http://www.json.org/example.html
{"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
}
}}
The same text expressed as XML:
on
main_window
500
500
250
250
center