Archive for 2009

JSONView 0.2 adds support for opening local .json files

Just a quick update on JSONView – I’ve submitted version 0.2 to addons.mozilla.org. This new version doesn’t have a lot of changes, but it adds some new translations (Hungarian, Bulgarian, German, and some Turkish), and you can now open “.json” files saved on your computer, enabling offline JSON viewing. This new version is also compatible with the latest Firefox 3.5 betas.

Of course, the extension must be reviewed before this new version can be released from the sandbox, but if you want to try it out you can download version 0.2 from the sandbox. Hopefully it’ll be approved soon and will show up on the main extension listing. Please give it a look and rate and review the extension on addons.mozilla.org.

I’ll be out of the US on vacation until next month, but after that I intend to do some more work on the feature backlog for JSONView, as well some updates to other projects. Remember you can vote on features or file new ones at the Google Code issue tracker for JSONView.

JSONView Updated to 0.1b3

Today I uploaded a new version of JSONView to addons.mozilla.org. I’m sticking with the wimpy version number for now, but I think JSONView has been proving itself out in the wild. One major bug was uncovered that caused JSON documents larger than 8KB to render incorrectly, and that’s fixed in this new version. I’ve also added three new translations of the extension (French, Dutch, and Czech) courtesy of the folks at BabelZilla.org – if you want to help out you can check out the available translations and add yours. Lastly, the extension is now compatible with Firefox 3.1b3. I’ve been trying to keep things tested on the beta browsers within a day or two of their release. If you have an older version of the extension you’ll need to go back to AMO and install it again – automatic updates won’t work until JSONView is out of the sandbox.

JSONView has gotten a bit of coverage on the blogs, too, which I’ve enjoyed. It made it onto the front page of Delicious and reddit programming, and Ars Technica wrote an article in their journals. Also, I was interviewed on OpenSource Release Feed, which was fun. I’m glad that people are getting to use the extension and find it helpful. Hopefully when it gets released from the sandbox it’ll get even broader exposure.

JSONView – View JSON documents in Firefox

I’m a big fan of JSON as a data exchange format. It’s simple, lightweight, easy to produce and easy to consume. However, JSON hasn’t quite caught up to XML in terms of tool support. For example, if you try to visit a URL that produces JSON (using the official “application/json” MIME type), Firefox will prompt you to download the file. If you try the same thing with an XML document, it’ll display a nice formatted result with collapsible sections. I’ve always wanted a Firefox extension that would give JSON the same treatment that comes built-in for XML, and after searching for it for a while I just gave up and wrote my own. The JSONView extension (install) will parse a JSON document and display something prettier, with syntax highlighting, collapsible arrays and objects, and nice readable formatting. In the case that your JSON isn’t really JSON (JSONView is pretty strict) it’ll display an error but still show you the text of your document. If you want to see the original text at any time, it’s still available in “View Source” too.

JSONView logo

I’ve been eager to release this for some time, but I finally pushed it to addons.mozilla.org last night. I actually started development on it about 7 months ago, but work got paused on it for about 6 months due to stuff out of my control, and then I had some other projects I was working on. The actual development only took a few days (including digging through some confusing Unicode bugs). I thought it was funny that right as I was resuming work on JSONView I noticed that a JSON explorer had actually landed for Firebug 1.4, which I’ll also be looking forward to. Initially I had intended to build that functionality as part of my extension. There’s a lot I’d like to add on, like JSONP support and a preference to send the “application/json” MIME type in Firefox’s accept headers.

This is actually my first real open source project – I’ve released some code under open source licenses before, but this is actually set up at Google Code with an issue tracker and public source control and everything. I’ve licensed it under the MIT license. I’m really hoping people get interested in improving the extension with me. I’ve pre-seeded the issue tracker with some known bugs and feature requests.

The extension itself is pretty simple. I wasn’t sure how to approach the problem of supporting a new content type for Firefox, so I followed the example of the wmlbrowser extension and implemented a custom nsIStreamConverter. What this means is that I created a new component that tells Firefox “I know how to translate documents of type application/json into HTML”. And that it does – parsing the JSON using the new native JSON support in Firefox 3 (for speed and security) and then constructing an HTML document that it passes along the chain. This seems to work pretty well, though there are some problems – some parts of Firefox forget the original type of the document and treat it as HTML, so “View Page Info” reports “text/html” instead of “application/json”, “Save as…” saves the generated HTML, Firebug sees the generated HTML, etc. Just recently I came across the nsIURLContentListener interface, which might offer a better way of implementing JSONView, but I’m honestly not sure – the Mozilla documentation is pretty sparse and it was hard enough to get as far as I did. I’m hoping some Mozilla gurus can give me some pointers now that it’s out in the open.

Right now the extension is versioned at “0.1b1″ which is a wimpy way of saying “this is a first release and it could use some work”. It’s also trapped in the “sandbox” at addons.mozilla.org, where it will stay until it gets some downloads and reviews. Please check it out, write a little review, and soon people won’t have to log in to install it!

Note: While composing this post I ran across the JSONovich extension which was apparently released in mid-December and seems to do similar stuff to JSONView. No reason we can’t have two competing extensions, though.

Fallout 3 licensed soundtrack with Amazon MP3 links

I just finished Fallout 3 last night. Yeah, that’s one of the reasons I haven’t released anything new in a while. One of my favorite parts of the game was the old music they used. I loved the BioShock soundtrack too. Now that I’m done with the game and won’t be listening to Galaxy News Radio anymore, I figured I’d hunt down the individual songs on Amazon MP3 so I can listen to them while I’m playing other games (my favorite is when Halo or Chrono Trigger music plays over another game). As long as I’m doing that, I thought I’d post the links for everyone else, since I didn’t find a list with links to download the songs anywhere online. I got the list itself from Wikipedia’s Fallout 3 page. Unfortunately not all of the songs are available – hopefully they’ll show up in time.

  1. I Don’t Want To Set The World On Fire” – The Ink Spots
  2. Way Back Home” – Bob Crosby & the Bobcats
  3. Butcher Pete (Part 1)” – Roy Brown
  4. Happy Times” (From the Danny Kaye film The Inspector General) – Bob Crosby & the Bobcats
  5. Civilization (Bongo, Bongo, Bongo)” – Danny Kaye with The Andrews Sisters
  6. Into Each Life Some Rain Must Fall” – Ella Fitzgerald with The Ink Spots
  7. Anything Goes” – Cole Porter
  8. “Fox Boogie” – Gerhard Trede
  9. “I’m Tickled Pink” – Jack Shaindlin
  10. “Jazzy Interlude” – Billy Munn
  11. “Jolly Days” – Gerhard Trede
  12. “Let’s Go Sunning” – Jack Shaindlin
  13. A Wonderful Guy” – Tex Beneke
  14. “Rhythm for You” – Eddy Christiani & Frans Poptie
  15. “Swing Doors” – Allan Gray
  16. Maybe” (Intro song from the original Fallout) – The Ink Spots
  17. Mighty Mighty Man” – Roy Brown
  18. Crazy He Calls Me” – Billie Holiday
  19. Easy Living” – Billie Holiday
  20. “Boogie Man” – Sid Phillips

Update: Amazon added the right version of “Butcher Pete” and I’ve linked it above.

Middle mouse button on a ThinkPad

File this under small victories, I guess. A couple months ago my trusty old ThinkPad R51 decided to cook itself to death, so I went ahead and got a shiny new ThinkPad T500. It’s quite an upgrade, but I missed one feature from my old machine. ThinkPads have this weird hybrid pointing device called a TrackPoint which consists of a trackpad and two buttons, then a nubbin-pointer and three buttons for that. On my old ThinkPad I could use the nubbin’s center button as a middle-click, which is great for opening links in new tabs, closing tabs, Unix-style copy/paste, etc.

t500

I didn’t even use the nubbin, I just used its button. However, on my new ThinkPad, the center button switched the nubbin to scrolling mode, and turning that off in the driver just made the button do nothing! However, I recently stumbled upon the solution. If you completely uninstall the UltraNav driver, the middle button becomes a normal middle mouse button again, and the nubbin and trackpad still work. Tab management is easy again!