Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

json-api/parser-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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