Why it matters

Circe is Scala FP JSON. Understanding shapes API design.

Advertisement

The architecture

Encoder/Decoder type classes.

Auto/semi-auto derivation.

Circe designEncoder / Decodertype classesDerivationauto or semiCursor-basedtraverse JSONSemi-auto derivation preferred over auto for compile perf
Circe usage.
Advertisement

How it works end to end

Auto: implicit derivation. Convenient but slower compile.

Semi-auto: explicit derive call. Faster.

Cursor: functional JSON traversal.

Circe optics: focus on parts of JSON.