Introduction

What is jsonapi-rb?

jsonapi-rb is a ruby library for producing and consuming JSON API documents. It is cleanly layered, has an intuitive yet intent-stating API, and no magic.

It is comprised of 4 independent micro-libraries:

and 2 framework integrations:

Overview

jsonapi-rb works by defining mappers (or presenters) to translate your business objects to JSON API documents, and JSON API payloads to custom hashes.

The deserializable resources (the mappers from JSON API payloads to custom hashes) can be used directly, as the input payload will only contain flat data.

The serializable resources, on the other hand, need to be coordinated through a renderer (as JSON API response document usually contain a graph of resources related to each other).

Guides

These guides should get you up to speed with using jsonapi-rb. If you have more questions, feel free to drop by on Gitter.