Revert "Revert "Merge pull request #9126 from mbarb0sa/bugfix/json-decoding-in-rails-3-0-stable""

This reverts commit f2839f1dbafc7c8b0bdceb6c636f5d44b7d686bc.