A JSON API parser, in Ruby
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/json
test
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
json-api.gemspec

README.md

JSON::Api

Build Status Code Climate

A parser and validator for JSON API documents.

Installation

Add this line to your application's Gemfile:

gem 'json-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install json-api

Usage

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

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request