An Elixir library for serializing data into JSON:API documents and parsing JSON:API query strings.
JSONAPI Elixir is a library for Elixir that serializes data models into JSON:API-compliant documents and parses JSON:API query strings. It solves the problem of building APIs that adhere to the JSON:API specification by providing tools for encoding data, handling query parameters like filtering and sorting, and ensuring spec compliance.
Elixir developers building JSON:API-compliant RESTful APIs, particularly those using the Phoenix framework and Ecto for database interactions.
Developers choose JSONAPI Elixir for its full compliance with the JSON:API 1.1 spec, seamless integration with Phoenix and Ecto, and extensible design for custom pagination and field transformations, reducing boilerplate when implementing standardized APIs.
JSON:API Serializer and Query Handler for Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements JSON:API 1.1 with support for compound documents, links, and meta data, ensuring strict adherence to the standard as listed in the README's feature checklist.
Provides plugs and view helpers that integrate directly with Phoenix, simplifying adoption for web applications through examples in the usage section.
Supports camelCase, dasherized, or underscored field names via configuration and plugs, allowing flexible API design as detailed in the field transformation instructions.
Allows custom pagination strategies through configurable modules or view overrides, enabling tailored link generation without locking into a specific approach.
Field transformations require multiple steps including global config and separate plugs like JSONAPI.UnderscoreParameters, which can be error-prone and add setup overhead.
The library only generates pagination links; actual data pagination and total page calculation must be implemented manually, as noted in the pagination section.
Optimized for Phoenix and Ecto, making it less straightforward for use with other Elixir web frameworks or data sources, limiting flexibility in non-standard setups.