This tutorial covers Circe, a functional JSON handling library for Scala, part of the Typelevel ecosystem and well integrated with Cats.
- To learn more about Circe: https://github.com/circe/circe
- To learn more about Monads and Applicative functors: https://www.youtube.com/watch?v=Tx5Ld…
- To learn more about Type classes: https://typelevel.org/cats/typeclasse…
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.