Correct toggling JSON formats, make Ruby 1.9.3