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 = "{\n  \"posts\": [{\n    \"id\": \"1\",\n    \"title\": \"Rails is Omakase\",\n    \"links\": {\n      \"author\": \"9\",\n      \"comments\": [ \"5\", \"12\", \"17\", \"20\" ]\n    }\n  }]\n}\n"

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