JSON and the Micro Framework
/Our entry to the Dare To Dream Different competition is coming along nicely. We’ve spent a goodly chunk of today working on how we are going to pass messages from the Micro Framework device and the server it is attached to. Number one son suggested using JavaScript Object Notation, or JSON.
We could have used XML, but this has always struck me as a rather verbose way to pass data. JSON on the other hand is nice and tight, and has the benefit that its entire syntax can be expressed on a single web page. We are presently writing a set of JSON classes for the Micro Framework. This is actually proving to be quite fun (there might be ready-written versions out there but I quite like writing my own versions of these kinds of things, just to keep my hand in).
If you are interested in a beautifully simple way to express a design for data structures you should take a look at this page and see how the author has done it. I’m also thinking that if you are looking for an exercise for your programming smarts you might want to create a library of classes that will read and write data in this form.
Once I’ve got ours working and I’m happy with it I’ll post it out there so that the Micro Framework can use this rather neat data structure.