Parsing JSON
Turn text into JSON values.
Why Circe?
Circe is a popular JSON library for Scala, built on top of the cats functional ecosystem.
It favors type-safety and immutability: parsing returns an Either rather than throwing, and decoding produces typed values instead of untyped maps.
This lesson covers turning raw JSON text into Circe's Json model.
Adding the Dependency
Circe ships as several modules. For parsing and the core model you need circe-core and circe-parser.
The circe-generic module adds automatic codec derivation, covered in later lessons.
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % "0.14.6",
"io.circe" %% "circe-parser" % "0.14.6"
)