Skip to content
Validate JSON API documents.
Branch: master
Clone or download
Pull request Compare This branch is even with jsonapi-rb:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/jsonapi
spec
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
VERSION
jsonapi-parser.gemspec

README.md

jsonapi-parser

Ruby gem for validating JSON API documents.

Status

Gem Version Build Status codecov Gitter chat

Resources

Installation

# In Gemfile
gem 'jsonapi-parser'

then

$ bundle

or manually via

$ gem install jsonapi-parser

Usage

First, require the gem:

require 'jsonapi/parser'

Then simply parse a document:

# This will raise JSONAPI::Parser::InvalidDocument if an error is found.
JSONAPI.parse_response!(document_hash)

or a resource create/update payload:

JSONAPI.parse_resource!(document_hash)

or a relationship update payload:

JSONAPI.parse_relationship!(document_hash)

License

jsonapi-parser is released under the MIT License.

You can’t perform that action at this time.