We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import org.virtuslab.yaml.* enum Rule derives YamlCodec: case Allow(ip: String) case Deny(ip: String) case DenyAll case AllowAll scala> List(Rule.Allow("192.168.0.1"), Rule.Deny("192.168.1.1")).asYaml.as[List[Rule]] val res2: Either[org.virtuslab.yaml.YamlError, List[Rule]] = Right(List(Allow(192.168.0.1), Allow(192.168.1.1))) scala> List(Rule.Allow("192.168.0.1"), Rule.Deny("192.168.1.1"), Rule.DenyAll).asYaml.as[List[Rule]] val res3: Either[org.virtuslab.yaml.YamlError, List[Rule]] = Left(org.virtuslab.yaml.ConstructError: Cannot parse ScalarNode(,CoreSchemaTag(tag:yaml.org,2002:null),Some(Range(Position(45,5,0),Vector(- , ip: 192.168.0.1, - , ip: 192.168.1.1, - , ),None))) at 5:0, ^ )
I think encoding of enums is plain broken as it seems to loose discriminator information:
scala> List(Rule.Allow("192.168.0.1"), Rule.Deny("192.168.1.1"), Rule.DenyAll).asYaml val res4: String = "- ip: 192.168.0.1 - ip: 192.168.1.1 - "
The text was updated successfully, but these errors were encountered:
lbialy
No branches or pull requests
I think encoding of enums is plain broken as it seems to loose discriminator information:
The text was updated successfully, but these errors were encountered: