JSON Files and emacs

I got tired of emacs not knowing I was essentially editing javascript files while writing JSON so I started to look into JS2-mode until I realised it was kind of overkill. Then I saw this comment that suggested telling emacs to use the inbuilt syntax handling for javascrpt for json files too!

(setq auto-mode-alist (cons '("\\.json\\'" . js-mode) auto-mode-alist))

Edit: 30/08/2013. I have now also taken a similar simple approach when editing LESS files with emacs too, as such:

(setq auto-mode-alist (cons '("\\.less\\'" . css-mode) auto-mode-alist))