0.15
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Validate JSONAPI response documents, resource creation/update payloads, and relationship update payloads.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.1
~> 11.3
~> 3.5
 Project Readme

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.