Symmetrical transformation between structured data and JSON
Allows concrete object/array data model classes to be defined, and then allows JSON serialization/parsing from/to an instance of one of those classes.
This allows a single body of code to be used to define a JSON API structure for a provider and its clients.
Instances of these models can also be used to help keep automated tests simple and reliable. Attempts by test setup code or code under test to produce incorrectly structured data will generally fail in a fast, informative way.
Add this line to your application's Gemfile:
gem 'son_jay'
And then execute:
$ bundle
Or install it yourself as:
$ gem install son_jay
- Fork it ( http://github.com//son_jay/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