Is any library widely used in the Scala community to parse and write YAML files? What are you using to process YAML files?
I use circe-yaml, it is mature, full featured, proven. For simple tasks scala-yaml is nice - esp. when you need Scala,js support. An interesting beast is a combination of the two - circe-yaml using scala-yaml as its backend, which gets you most circe functionality on Scala.js / native.
Less well-known, but almost uniquely versatile, is weePickle, a de/serialization library that translates smoothly in and out of several different formats: GitHub - rallyhealth/weePickle: A fork of uPickle, shaded for backwards and forwards compatibility.
(Disclaimer: I was involved in the original creation of weePickle, so I have a little ego-stake here, but haven’t been involved with the library for a long time. But I do quite love its design. It is a deep fork of Haoyi’s uPickle (also an excellent library), with a lot of pragmatic evolution in various ways. Caveat: it is JVM-specific, so not appropriate if you need to run on JS or Native.)
I’m a fan of Circe anyway for JSON, so it’s nice to use the same tool for YAML too. What I like about about Circe as opposed to say, Jackson is the perscriptive approach it takes to defining the structure of JSON - your Scala type definition is the the source of truth, rather than runtime reflection on the instance being serialised, or a set of heuristics about the best representation to deserialize an array of whatever at runtime. I’ve been bitten by round tripping issues before when using Jackson from Java and Scala.
That point is from JSON processing, but you may bump into similar issues with YAML.
Wow, thanks for sharing. I’ve been using Spray JSON in an Akka project and I’m excited to see if this can remove hundreds of lines of boilerplate.