A parser and validator for JSON API documents.
Add this line to your application's Gemfile:
gem 'json-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install json-api
require 'json/api'
json = <<-JSON
{
"posts": [{
"id": "1",
"title": "Rails is Omakase",
"links": {
"author": "9",
"comments": [ "5", "12", "17", "20" ]
}
}]
}
JSON
puts JSON::Api.parse(json).class # => Hash
- Fork it
- 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