Monday, September 08, 2008


ceo has an article on using json in j2me apps where usually the j2me app makes a http request and the server responds with some data, usually comma delimited. This is painful, believe me, you have to remember the order of the data, the type and most of all, what if the data has a comma in between!

So, whats the next solution? XML thats what comes to the minds of most of the java developers. but XML is costly, costly in terms of processing power and memory. Also, the fear on the developers face if he is a fresher, "I have to use XML? oh god! quick quick, Google!"

Next solution, JSON. Now, the use of JSON in most of the applications has become soo much defunct idea to me that I dont feel there needs to be some "thinking" done when some applications is to be designed and data transport format has to be finalized. Most of the time, I simply dont think and use JSON straight away! I mean, its like a culture for me now. And it works!

I hate XML if the only purpose if to transmit some data over the network and extract it back. When I joined the company I am working now(more than a year now), I was asked to take change of a j2me app. The moment I realised that folks here used the same old traditional way(comma separated values a.k.a CSV) of sending and recieving data, I got pissed off! Most of all, I was surprised, that how could people not think of JSON!

I spoke to other people in the office(the senior technical members) and finalized that JSON is going to be the transport format. Nodoby in the company knew about what JSON is, they had not even heard of it, it was an alien word for them. I was then asked to demo it, which I did and thats all. Its been more than a year now, that we use JSON everywhere!

We also built a complete SMS based campaigning platform, integrating with the mobile operators, and all the communication happens over JSON.(Its a core java project, not any j2me or J2EE, it has sockets, MINA, database etc)

Anyway, the above article forced me to write this. My friend keeps on telling me to write down any new thing that I do, mainly these kind of ideas. I am lazy most of the time and sometimes I feel the idea is an obvious one and dont bother to write about it only to realise that, an "Article" is posted on the idea I had some long time back :(

No hard feelings, I now know I am much ahead of time ;)