added toJson for record class
Merge branch 'master' of git://github.com/twinh/widget