Working with JSON in Scala, a Circe Crash Course

This tutorial covers Circe, a functional JSON handling library for Scala, part of the Typelevel ecosystem and well integrated with Cats.

The video covers:

  • 00:00 The overall structure of the library
  • 04:43 The Json data type
  • 13:51 Encoders
  • 17:14 Decoders
  • 30:39 Automatic derivation
  • 32:33 Semi-automatic derivation
  • 34:55 Automatic derivation considered harmful and conclusion

A note about the placement of Json codecs and the “automatic derivation considered harmful” part of the video: placing our Encoder[YoutubeVideo] in the companion object of YoutubeVideo would have solved the problem. Since Scala automatically imports implicits from companion objects, we would have never forgotten the import in the first place.

Read more →

Functional stream processing with Scala, a crash course on fs2

Read more →