Skip to content

hnaderi/yaml4s

Repository files navigation

Yaml4s icon
Yaml4s (Cross platform YAML for Scala, Scala.js and scala native)

yaml4s-core Scala version support javadoc GitHub Workflow Status GitHub
Scala Steward badge

What is this library?

This library is a cross platform yaml parsing and printing library that supports full yaml spec (1.2 on jvm and js, 1.1 on native), that focuses on simplicity, extensibility while remaining ecosystem agnostic.
Aside from its own data model (named YAML), this library also supports and provides several integrations with popular json libraries, in which you can parse to and print from directly, without any intermediate object generation.
Current integrations include: circe, zio json, play json, json4s, spray json, also integrations can be added very easily, open an issue or submit a PR if you want any other integrations with other major libraries.

What this library is not?

If you want a full blown yaml manipulation library with direct yaml AST support, this library is not the solution to your problem; however if you want using YAML as a serialization format this library is the perfect choice, as it adds support for latest YAML spec to your favorite JSON library and you don't need to learn something new or deal with complex YAML syntax!

Why this library?

Angel tells a man: It says you should be in hell, but since you were a YAML engineer, we will consider that as time served.

YAML can easily be the worst serialization format you may encounter in your career, but it's life and we need to do shit sometimes!
This library is a pragmatic solution that tries to empower the scala ecosystem and all of its tribes by adding the YAML support to other existing libraries.
If all you want is reading and writing YAML, with complete spec support, without trying to implement it from scratch in Scala, this library is the perfect fit.

Besides that, it's here to warm your heart in those dark times you need to work with YAML!

Getting started

visit Project site to see tutorials and docs.