I still think JSON was a bad idea, that we should have worked harder, all of us, to make a single simple text-based data sharing language. And, if you ever doubted my sincerity, you can believe it now because I now have done the work to make my programming environment able to both send and receive JSON. A couple of weeks ago, as part of the FeedHose project, I made it so that it could transmit JSON. And over the last few days I've written a JSON parser. For those people who are familiar with Frontier (the OPML Editor is just a distribution of Frontier, which was GPL'd in 2005), the JSON support is designed to work with the internals that have already been built around XML. There are two main routines for that, xml.compile and xml.decompile. There are two new routines, xml.jsonToTable and xml.tableToJson, that work exactly as the equivalent XML routines. They produce the same structures, so that all the techniques we have for walking structures work whether the data came to us through JSON or XML. I've put up a web app for testing the JSON support in the OPML Editor. If you want to help, find bits of valid JSON that it doesn't correctly deal with. And find invalid JSON that it accepts. |