kaml icon indicating copy to clipboard operation
kaml copied to clipboard

SingleLineStringStyle.Plain quotes polymorphic type

Open PaulWoitaschek opened this issue 11 months ago • 1 comments

Describe the bug

SingleLineStringStyle.Plain quotes polymorphic types

Reproduction repo

No response

Steps to reproduce

fun sample() {
  val yaml = Yaml(
    configuration = YamlConfiguration(
      polymorphismStyle = PolymorphismStyle.Property,
      singleLineStringStyle = SingleLineStringStyle.Plain,
    ),
  )
  println(
      yaml.encodeToString(Something.serializer(), Something.A("Alice")),
  )
}

Expected behaviour

This should have the type unqouted

Actual behaviour

It's quoted:

type: "a"
name: Alice

Version information

0.57.0

Any other information

No response

PaulWoitaschek avatar Mar 01 '24 08:03 PaulWoitaschek