Thanks to Jeff for pointing this out. Here is a 3 minute tutorial on JSON.
- They are both ‘self-describing’ meaning that values are named, and thus ‘human readable’
- Both are hierarchical. (i.e. You can have values within values.)
- Both can be parsed and used by lots of programming languages
- Both can be passed around using AJAX (i.e. httpWebRequest)
I have heard of JSON a while ago, when I was looking at Yahoo SDK for web. It looked cool but I did not spend time using it. I wanted to understand the following before I jump in:
- Can it be used by languages other than Javascript – the answers seems to be yes.
- Can I do a lossless transformation of XML to JSON and JSON to XML – I do not know but for the subset of XML it represents, this seems possible.
It is likely to be popular for AJAX apps. However, will it replace XML as payload? Only time will tell.