YamlMappingBuilder
Defines YAML mapping builder.
import scala.language.implicitConversions
import shampoo.yaml.{ *, given }
val user = YamlMappingBuilder()
.add("id", 1000)
.add("name", "lupita")
.add("groups", Set("lupita", "sudoer"))
.toYamlMapping()
assert { user("id").as[Int] == 1000 }
assert { user("name").as[String] == "lupita" }
assert { user("groups").as[Set[String]] == Set("lupita", "sudoer") }
Attributes
- See also
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key-value pair to mapping.
Adds key-value pair to mapping.
Attributes
- Returns
-
this builder
Adds key associated with null value to mapping.
Adds key associated with null value to mapping.
Attributes
- Returns
-
this builder
Constructs mapping.
Constructs mapping.