guardian / fezziwig

Fezziwig is a library for compile time generation of Circe encoders/decoders for Scrooge-generated classes representing Thrift objects.

GitHub

Fezziwig

Maven Central Build Status

Fezziwig is a library for compile time generation of Circe encoders/decoders for Scrooge-generated classes representing Thrift objects.

Installation

libraryDependencies ++= Seq(
  "com.gu" %% "fezziwig" % "0.6"
)

Usage

import com.gu.fezziwig.CirceScroogeMacros._

The generated decoders support accumulation of errors, e.g.

import com.gu.fezziwig.CirceScroogeMacros._
val decoder = Decoder[MyThriftStruct]
val result = decoder.accumulating(json.hcursor)