Rack::CamelSnake is a Rack middleware to convert keys in a json from camelCase into snake_case, and vice versa.
- ruby 2.1.0 or higher
Add this line to your application's Gemfile:
gem 'rack-camel_snake', :git => 'https://github.com/junsumida/rack-camel_snake.git'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack-camel_snake
Please add use Rack::CamelSnake
to your config.ru
file. For example,
use Rack::CamelSnake
run YourRackApp
- Fork it ( http://github.com//rack-camel_snake/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request