Yaml
shampoo.yaml.Yaml
object Yaml
Provides YAML utilities.
import scala.language.implicitConversions
import shampoo.yaml.{ *, given }
// Create YAML mapping
val user = Yaml.map("id" -> 1000, "name" -> "lupita")
// Create YAML sequence
val info = Yaml.seq(user, "/home/lupita", 1024)
// Load YAML
val root = Yaml.load("{ id: 0, name: root }")
case class User(id: Int, name: String)
given userRepresenter: YamlRepresenter[User] =
user => Yaml.map("id" -> user.id, "name" -> user.name)
// Represent value to YAML
val nobody = Yaml.toYaml(User(65534, "nobody"))
// Dump YAML to stdout
Yaml.dump(nobody, System.out)
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Yaml.type
Members list
Value members
Concrete methods
Dumps YAML to supplied output.
Dumps YAML to supplied output.
Attributes
Dumps YAML to supplied output.
Dumps YAML to supplied output.
Attributes
Dumps YAML to supplied output.
Dumps YAML to supplied output.
Attributes
Dumps YAML to supplied output.
Dumps YAML to supplied output.
Attributes
Loads YAML mapping.
Loads YAML mapping.
Loads YAML mapping.
Loads YAML mapping.
Loads YAML mapping.
Creates YAML mapping with supplied key-node pairs.
Creates YAML mapping with supplied key-node pairs.
Attributes
Creates YAML sequence with supplied nodes.
Creates YAML sequence with supplied nodes.
Attributes
Represents data.
Represents data.
Value parameters
- data
-
native data
- representer
-
data representer
Attributes
In this article