Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. JSON
  3. scala-jsonapi

scala-jsonapi

NOASSERTIONScala

A Scala library for easily producing and consuming JSON output compliant with the JSON API specification.

GitHubGitHub
108 stars29 forks0 contributors

What is scala-jsonapi?

scala-jsonapi is a Scala library designed to help developers produce and consume JSON output that adheres to the JSON API specification. It provides serialization and deserialization support for multiple JSON backends, ensuring consistent data interchange in RESTful APIs. The library abstracts the complexities of the JSON API standard, making it easier to implement compliant APIs in Scala applications.

Target Audience

Scala developers building RESTful APIs that need to comply with the JSON API specification, particularly those using frameworks like Play, Spray, or Akka HTTP.

Value Proposition

Developers choose scala-jsonapi for its seamless integration with popular Scala JSON libraries, type-safe serialization via type classes, and out-of-the-box support for major HTTP frameworks, reducing boilerplate and ensuring spec compliance.

Overview

Scala support library for integrating the JSON API spec with Spray, Play! or Circe

Use Cases

Best For

  • Building RESTful APIs in Scala that require JSON API compliance
  • Integrating JSON API with Play Framework applications
  • Serializing Scala case classes to JSON API format in Spray-based projects
  • Adding JSON API support to Akka HTTP services
  • Ensuring consistent JSON output across microservices using the JSON API spec
  • Reducing boilerplate code for JSON API serialization and deserialization

Not Ideal For

  • Teams using Scala 2.12 or later versions, as the library only supports Scala 2.11
  • Production applications requiring stable APIs without breaking changes, since it's marked as a work in progress
  • Projects not adhering to the JSON API specification, as the library adds unnecessary complexity
  • Developers seeking automatic serialization with zero configuration, due to manual type class implementation

Pros & Cons

Pros

Multi-Backend Compatibility

Supports Play-JSON, Spray-JSON, and Circe, allowing integration with various Scala JSON libraries, as highlighted in the key features.

Framework Integration

Provides out-of-the-box marshallers for Spray, Play, and Akka HTTP, reducing boilerplate code in web applications using these frameworks.

Type-Safe Serialization

Uses JsonapiRootObjectWriter and JsonapiRootObjectReader type classes for compile-time safety when converting between Scala case classes and JSON API.

JSON API Spec Compliance

Fully handles JSON API features like links and meta information, ensuring consistent and interoperable JSON output across services.

Cons

Outdated Scala Support

Only compatible with Scala 2.11, which is outdated and may not work with modern Scala projects using versions 2.12 or higher.

API Instability

The README states it's a work in progress with API changes expected, making it risky for production use due to potential breaking updates.

Manual Configuration Required

Requires implementing type classes for each resource type, adding boilerplate and development effort compared to automatic solutions.

Limited Documentation

Examples in the README are sparse, lacking comprehensive tutorials or advanced use cases, which can hinder onboarding and troubleshooting.

Frequently Asked Questions

Quick Stats

Stars108
Forks29
Contributors0
Open Issues13
Last commit7 years ago
CreatedSince 2015

Tags

#json-api#akka-http#play-framework#rest-api#json-serialization#serialization#scala#circe

Built With

S
Scala
C
Circe
A
Akka HTTP

Included in

JSON1.5k
Auto-fetched 6 hours ago

Related Projects

JSON for Modern C++JSON for Modern C++

JSON for Modern C++

Stars50,198
Forks7,437
Last commit15 hours ago
FastjsonFastjson

FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.

Stars25,611
Forks6,405
Last commit2 years ago
GsonGson

A Java serialization/deserialization library to convert Java Objects into JSON and back

Stars24,224
Forks4,456
Last commit12 hours ago
simdjsonsimdjson

Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks

Stars24,035
Forks1,264
Last commit9 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub